-
UpdatePanel load user control
<pre data-sub="prettyprint:_"> string ascx = "customerview.ascx"; UpdatePanel1.ContentTemplate = this.LoadTemplate(ascx); </pre> -
why set body margin to 0
Because in IE7 body.marginleft == 10px, but firefox is 8px; ie7 margintop is 15px, firefox is 8px -
Creating asp.net ajax class
<pre data-sub="prettyprint:_"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head id="Head1" runat="server"> <title>ASP.NET AJAX Class</title> <script type="text/javascript">function pageLoad(sender, args) { Type.registerNamespace('Wrox.ASPAJAX.Samples'); Wrox.ASPAJAX.Samples.Album = function(title, artist) { this._title = title; //_title = title; this._artist = artist; } -
asp.net ajax namespace
<pre data-sub="prettyprint:_"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head id="Head1" runat="server"> <title>ASP.NET AJAX Namespaces</title> <script type="text/javascript"> function pageLoad(sender, args) { Type.registerNamespace('Wrox.ASPAJAX.Samples'); alert(Type.isNamespace(Wrox.ASPAJAX)); //displays alert(Type.isNamespace(Wrox.ASPAJAX.Samples)); //displays var namespaces = Type.getRootNamespaces(); for(var i = 0, length = namespaces.length; i < length; i++) { alert(namespaces[i].getName()); //displays }} </script> </head><body> <form id="form1" runat="server"> <asp:ScriptManager runat="server" ID="scriptManager1" /> <div> </div> </form></body></html> </pre> -
Creating Custom ASP.NET AJAX Client Controls
The full article is <a href="http://asp.net/AJAX/Documentation/Live/tutorials/CreatingCustomClientControlsTutorial.aspx">here</a>, The summary is bellow.