Blog Home  Home Feed your aggregator (RSS 2.0)  
kevin Mocha - Wednesday, August 15, 2007
Bookmarks collected from web.
 
 Wednesday, August 15, 2007

ASP.NET Page Life-Cycle

http://www.15seconds.com/issue/020102.htm

http://msdn.microsoft.com/en-us/library/ms178472.aspx

http://msdn2.microsoft.com/en-us/library/7949d756-1a79-464e-891f-904b1cfc7991.aspx

  1. Object Initialization
  2. Load Viewstate Data
  3. LoadPostData Processes Postback Data
  4. Object Load
  5. Raise PostBack Change Events (Offended object)
  6. Process Client-Side PostBack Event (Offending Object)
  7. Prerender the Objects
  8. ViewState Saved
  9. Render to HTML
  10. Disposal

ASP.NET AJAX Client Life-Cycle Events

http://asp.net/ajax/documentation/live/overview/AJAXClientEvents.aspx  (Very Good Article)

A Microsoft ASP.NET AJAX page raises the same server life-cycle events as an ASP.NET 2.0 Web page and also raises client life-cycle events.

ASP.NET 2.0 Page Lifecycle Chart
Wednesday, August 15, 2007 3:38:35 PM UTC  #    Comments [0]    |   |  Trackback
 Monday, August 13, 2007
 Friday, August 10, 2007
 Thursday, August 09, 2007

Get Label control text value in java script code:

var x = document.getElementById('<%= Label1.ClientID %>').innerText;

 

Get text value of textbox  in java script code:

Say you have a textbox like follows:

<asp:TextBox id="txtMyTextBox" runat="Server" Text="1234"></asp:TextBox>

In javascript do the following to get value:

var value = document.getElementById('<%=txtMyTextBox.ClientID%>').value;

As TextBox is server control, so on runtime this control have different client id

'<%=txtMyTextBox.ClientID%>' will return control clientid on runtime

 

Get value of dropdownlist in java script code:

 var statePickerDropDownList = document.getElementById('<%=statePicker.ClientID%>');
 var state = statePickerDropDownList.options[statePickerDropDownList.selectedIndex].value;


pass field value in Grdview to java script

http://forums.asp.net/t/1099098.aspx

<asp:TemplateField>
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl=<%# String.Format("javascript:void(window.open('http://www.{0}.com'))", Eval("ProductID")) %>> HyperLink</asp:HyperLink>
                    </ItemTemplate>

</asp:TemplateField>

Thursday, August 09, 2007 4:54:47 AM UTC  #    Comments [0]    |  Trackback
 Wednesday, August 08, 2007
http://mattberseth.com/blog/modalpopupextender/
ModalPopupExtender Example for Editing Rows in a GridView (Master/Detail Scenario)

http://mattberseth.com/blog/2007/07/modalpopupextender_example_for.html

Wednesday, August 08, 2007 11:40:02 PM UTC  #    Comments [0]    |  Trackback
 Thursday, August 02, 2007

Keep you up to date with the latest on marshups and the new Web 2.0 APIs

http://www.programmableweb.com/

Thursday, August 02, 2007 11:41:08 PM UTC  #    Comments [0]    |  Trackback
 Wednesday, August 01, 2007
Wednesday, August 01, 2007 4:48:53 AM UTC  #    Comments [2]    |  Trackback

Thank you for signing up for a Google Maps API key!

Your key is:

ABQIAAAADZOzmiiLzElWWoxN2P0pkBTcZS7Uqt_rAOCulJ-gP9vRrY3NIxTTATiB-tV0huJd34SsU0poHxkbFw

This key is good for all URLs in this directory:

http://lulu.gotdns.org/

Here is an example web page to get you started on your way to mapping glory:

Check out the API documentation for more information.

Wednesday, August 01, 2007 4:16:06 AM UTC  #    Comments [0]    |  Trackback
 Monday, July 23, 2007

Implementing the Singleton Pattern in C#


http://www.yoda.arachsys.com/csharp/singleton.html

Five implementations are given. The author also compared their pros and cons.

Bestone is:
public sealed class Singleton
{
Singleton()
{
}

public static Singleton Instance
{
get
{
return Nested.instance;
}
}

class Nested
{
// Explicit static constructor to tell C# compiler
// not to mark type as beforefieldinit
static Nested()
{
}

internal static readonly Singleton instance = new Singleton();
}
}

Monday, July 23, 2007 3:49:45 PM UTC  #    Comments [0]    |  Trackback
Copyright © 2009 Kevin Mocha. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: