[{"data":1,"prerenderedAt":2270},["ShallowReactive",2],{"article-microsoft-ajax-features-and-implementation-samples":3},{"article":4,"tags":1970,"previous":1985,"next":2088},{"id":5,"title":6,"author":7,"body":8,"createdAt":1959,"description":1960,"extension":1961,"img":1954,"meta":1962,"navigation":1963,"path":1964,"seo":1965,"stem":1966,"tags":1967,"updatedAt":1959,"__hash__":1969},"articles\u002Farticles\u002Fmicrosoft-ajax-features-and-implementation-samples.md","Microsoft AJAX Features and Implementation Samples","[object Object]",{"type":9,"value":10,"toc":1956},"minimark",[11,15,22,38,41,61,67,84,139,168,171,179,182,399,402,419,422,430,490,596,599,607,610,1018,1020,1023,1033,1950],[12,13,14],"p",{},"There are many options within the Microsoft stack of products for AJAX type functionality.  The following article covers the primary mechanisms that utilize the Microsoft out of the box Ajax functionality.  Ajax must be one of the technologies used in all current web applications.  The primary benefit is the improved user experience by providing quick, responsive feedback.",[12,16,17,18,21],{},"Core features include Ajax Client Libraries and Ajax Server Controls.  These libraries and controls enable the developer to quickly implement solutions within any ASP.NET application. ",[19,20],"br",{},"\nI have also included in this article the examples for utilizing the Microsoft AJAX libraries using:",[23,24,25,29,32,35],"ul",{},[26,27,28],"li",{},"update panel server control",[26,30,31],{},"access to web service from JavaScript",[26,33,34],{},"access to page methods (without web service)",[26,36,37],{},"HttpRequest\u002FPost from javascript.",[12,39,40],{},"AJAX Client Libraries",[23,42,43,46,49,52,55,58],{},[26,44,45],{},"Client-Script libraries that provide features for object-oriented development which enable high level of consistency and modularity in client scripting.",[26,47,48],{},"Browser compatibility",[26,50,51],{},"Extensions to JavaScript such as classes, namespaces, event handling, inheritance, data types and object serialization",[26,53,54],{},"Networking layer that handles communication with web based services",[26,56,57],{},"Sys Namespace",[26,59,60],{},"Javascript Shortcuts i.e. $get(‘elementId’), $addHandler, $removeHandler",[12,62,63],{},[64,65,66],"strong",{},"Asp.Net AJAX Server Controls",[23,68,69,72,75,78,81],{},[26,70,71],{},"ScriptManager",[26,73,74],{},"Manages Javascript",[26,76,77],{},"Enables partial page rendering w\u002FUpdatePanel",[26,79,80],{},"Creates client side proxies for Web Services",[26,82,83],{},"Provides registration methods for scripts",[85,86,87,88,87],"blockquote",{},"  \n",[89,90,93,94,100,101,105,106,110,111,114,115,119,120,124,125,129,130,133,134,138],"pre",{"className":91},[92],"csharpcode","\u003Casp:ScriptManager ID=",[95,96,99],"span",{"className":97},[98],"str","\"mng1\""," runat=",[95,102,104],{"className":103},[98],"\"server\"","  \n                    EnablePartialRendering=",[95,107,109],{"className":108},[98],"\"true|false\"","  \n                    EnablePageMethods=",[95,112,109],{"className":113},[98],"  \n                    ScriptMode=",[95,116,118],{"className":117},[98],"\"Auto|Inherit|Debug|Release\"","  \n                    ScriptPath=",[95,121,123],{"className":122},[98],"\"...\"",">                          \n                    \u003CScripts>  \n                        \u003Casp:ScriptReference Name=",[95,126,128],{"className":127},[98],"\"script.js\""," Assembly=",[95,131,123],{"className":132},[98]," \u002F>  \n                    \u003C\u002FScripts>  \n                    \u003CServices>  \n                        \u003Casp:ServiceReference Path=",[95,135,137],{"className":136},[98],"\"~\u002FMyWebService.asmx\""," \u002F>                          \n                    \u003C\u002FServices>      \n       \u003C\u002Fasp:ScriptManager>",[23,140,141,144,147,150,153,156,159,162,165],{},[26,142,143],{},"ScriptManagerProxy",[26,145,146],{},"Used with Master Pages",[26,148,149],{},"If you include the ScriptManager control on the master page, it can act as the ScriptManager control for all content pages.  If you want to register scripts or services declaratively in a content page, you can add a ScriptManagerProxy control to the content page.",[26,151,152],{},"UpdatePanel",[26,154,155],{},"Improves user experience of application by updating a portion of the web page thereby improving interactivity",[26,157,158],{},"By default controls within the update panel can trigger the update.  ChildrenAsTriggers property is by default set to true.  In our example the link button is within the update panel and so can trigger the partial page update.  By default any postback control inside an update panel causes an async postback",[26,160,161],{},"Controls outside of the update panel can also trigger the panel contents to update.  For example look at btnGo, it resides outside the panel however it is defined within the panel as a trigger\u002Fcontrol that can force the async update to the panel contents.  Reference the \u003Casp:AsyncPostBackTrigger> element within the \u003CTrigger> element of the updatePanel",[26,163,164],{},"set EnableParitalPageRendering=”true”",[26,166,167],{},"Shown here is how a timer defined outside of the panel can trigger the update panel to refresh at a defined interval",[85,169,170],{},"  \n     \u003Casp:UpdatePanel id=”panel1” runat=”server” \n                              UpdateMode=”Always\u002FConditional” \n                              ChildrenAsTriggers=”true\u002Ffalse”> \n                       \u003CTriggers> \n                             \u003Casp:AsyncPostBackTrigger ControlID=”timer1”\u002F> \n                        \u003C\u002FTriggers> \n                        \u003CContentTemplate> \n                             \u003C!—page content here --> \n                       \u003C\u002FContentTemplate> \n        \u003C\u002Fasp:UpdatePanel> \n       \u003Casp:Timer id=”timer1” runat=”server” Interval=”3000” OnTick=”OnTimerTick”\u002F>  \n",[23,172,173,176],{},[26,174,175],{},"UpdateProgress",[26,177,178],{},"provides status information about partial-page updates in the UpdatePanel controls.  The content can be customized.  To prevent flashing when a partial-page update is very fast, you can specify a delay before the UpdatePanel control is displayed",[64,180,181],{},"\n Update Panel Example ",[85,183,184,185,254,255,87],{},"  \nCode behind which responds to the button click to update a label control with the current time.  \n",[186,187,87,189,87],"div",{"style":188},"line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 85.8%; font-family: consolas, 'Courier New', courier, monospace; height: 210px; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: gray 1px solid; padding: 4px;",[186,190,87,192,87,207,87,211,87,225,87,228,87,231,87,234,87,237,87,247,87,249,87,251,87],{"style":191},"line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;",[89,193,195,199,200,199,203,206],{"style":194},"line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;",[95,196,198],{"style":197},"color: #0000ff;","public"," ",[95,201,202],{"style":197},"partial",[95,204,205],{"style":197},"class"," Panel : System.Web.UI.Page",[89,208,210],{"style":209},"line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;","{",[89,212,213,214,199,217,220,221,224],{"style":194},"    ",[95,215,216],{"style":197},"protected",[95,218,219],{"style":197},"void"," Page_Load(",[95,222,223],{"style":197},"object"," sender, EventArgs e)",[89,226,227],{"style":209},"    {",[89,229,230],{"style":194},"        lblName.Text = DateTime.Now.ToString();",[89,232,233],{"style":209},"    }",[89,235,236],{"style":194}," ",[89,238,213,239,199,241,243,244,246],{"style":209},[95,240,216],{"style":197},[95,242,219],{"style":197}," lnkButton_Click(",[95,245,223],{"style":197}," sender, EventArgs e) {",[89,248,230],{"style":194},[89,250,233],{"style":209},[89,252,253],{"style":194},"}","  \nPage HTML code with embedded update panel which responds to a control within the panel and a button defined as a trigger outside of the panel control.  \n",[186,256,87,258,87],{"style":257},"line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 86.23%; font-family: consolas, 'Courier New', courier, monospace; height: 210px; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: gray 1px solid; padding: 4px;",[186,259,87,260,87,263,87,273,87,286,87,294,87,297,87,314,87,333,87,336,87,339,87,346,87,349,87,352,87,363,87,366,87,369,87,372,87,375,87,378,87,380,87,393,87,396,87],{"style":191},[89,261,262],{"style":194},"\u003Cbody>",[89,264,265,266,100,270,272],{"style":209},"    \u003Cform id=",[95,267,269],{"style":268},"color: #006080;","\"form1\"",[95,271,104],{"style":268},">",[89,274,275,276,100,279,281,282,285],{"style":209},"        \u003Casp:ScriptManager ID=",[95,277,278],{"style":268},"\"ScriptManager1\"",[95,280,104],{"style":268}," EnablePartialRendering=",[95,283,284],{"style":268},"\"true\"",">\u003C\u002Fasp:ScriptManager>",[89,287,288,289,100,292,272],{"style":209},"        \u003Casp:UpdatePanel ID=",[95,290,291],{"style":268},"\"UpdatePanel1\"",[95,293,104],{"style":268},[89,295,296],{"style":194},"            \u003CContentTemplate>",[89,298,299,300,100,303,305,306,309,310,313],{"style":209},"                 \u003Casp:Label ID=",[95,301,302],{"style":268},"\"lblName\"",[95,304,104],{"style":268}," CssClass=",[95,307,308],{"style":268},"\"lbl\""," Text=",[95,311,312],{"style":268},"\"\"",">\u003C\u002Fasp:Label>",[89,315,316,317,100,320,305,322,325,326,309,329,332],{"style":209},"                 \u003Casp:LinkButton ID=",[95,318,319],{"style":268},"\"lnkButton\"",[95,321,104],{"style":268},[95,323,324],{"style":268},"\"lnk\""," onclick=",[95,327,328],{"style":268},"\"lnkButton_Click\"",[95,330,331],{"style":268},"\"Update\"",">\u003C\u002Fasp:LinkButton>",[89,334,335],{"style":209},"            \u003C\u002FContentTemplate>        ",[89,337,338],{"style":194},"            \u003CTriggers> ",[89,340,341,342,345],{"style":209},"              \u003Casp:AsyncPostBackTrigger ControlID=",[95,343,344],{"style":268},"\"btnGo\""," \u002F>",[89,347,348],{"style":194},"            \u003C\u002FTriggers>",[89,350,351],{"style":209},"        \u003C\u002Fasp:UpdatePanel>",[89,353,354,355,100,358,360,361,272],{"style":209},"        \u003Casp:UpdateProgress ID=",[95,356,357],{"style":268},"\"UpdateProgress1\"",[95,359,104],{"style":268}," AssociatedUpdatePanelID=",[95,362,291],{"style":268},[89,364,365],{"style":194},"            \u003CProgressTemplate>",[89,367,368],{"style":209},"                Updating.",[89,370,371],{"style":194},"            \u003C\u002FProgressTemplate>",[89,373,374],{"style":209},"        \u003C\u002Fasp:UpdateProgress>",[89,376,377],{"style":209},"        \u003Cbr \u002F>",[89,379,377],{"style":194},[89,381,382,383,100,385,305,387,309,390,345],{"style":209},"        \u003Casp:Button ID=",[95,384,344],{"style":268},[95,386,104],{"style":268},[95,388,389],{"style":268},"\"btn\"",[95,391,392],{"style":268},"\"Go\"",[89,394,395],{"style":209},"    \u003C\u002Fform>",[89,397,398],{"style":194},"\u003C\u002Fbody>",[64,400,401],{},"Ajax and Web Service Example",[23,403,404,407,410,416],{},[26,405,406],{},"Script Callable Web Service",[26,408,409],{},"Proxies are automatically generated",[26,411,412,415],{},[95,413,414],{},"ScriptService"," Attribute",[26,417,418],{},"If the web service returns a complex type, the succeeded callback function receives a return value in the form of Javascript object that corresponds to the server type.",[12,420,421],{},"Web Service code (simple function that returns ‘Hello World’)",[23,423,424],{},[26,425,426,427,429],{},"Web Service has ",[95,428,414],{}," attribute",[186,431,87,433,87],{"style":432},"line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 82.54%; font-family: consolas, 'Courier New', courier, monospace; height: 210px; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: gray 1px solid; padding: 4px;",[186,434,87,435,87,442,87,445,87,448,87,455,87,460,87,462,87,464,87,467,87,475,87,485,87,488,87],{"style":191},[89,436,437,438,441],{"style":209},"[WebService(Namespace = ",[95,439,440],{"style":268},"\"http:\u002F\u002Ftempuri.org\u002F\"",")]",[89,443,444],{"style":194},"[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]",[89,446,447],{"style":209},"[System.Web.Script.Services.ScriptService]",[89,449,450,199,452,454],{"style":194},[95,451,198],{"style":197},[95,453,205],{"style":197}," MyWebService : System.Web.Services.WebService {",[89,456,213,457,459],{"style":194},[95,458,198],{"style":197}," MyWebService () {",[89,461,233],{"style":209},[89,463,236],{"style":194},[89,465,466],{"style":209},"    [WebMethod]",[89,468,213,469,199,471,474],{"style":194},[95,470,198],{"style":197},[95,472,473],{"style":197},"string"," HelloWorld() {",[89,476,477,478,199,481,484],{"style":209},"        ",[95,479,480],{"style":197},"return",[95,482,483],{"style":268},"\"Hello World\"",";",[89,486,487],{"style":194},"    }    ",[89,489,253],{"style":209},[85,491,492,493,87,594,87],{},"  \nPage Code (page with button which calls js function, which in turn calls the web service defined within ScriptManager-ScriptReference tag)  \n",[186,494,87,496,87],{"style":495},"line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 86.21%; font-family: consolas, 'Courier New', courier, monospace; height: 210px; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: gray 1px solid; padding: 4px;",[186,497,87,498,87,505,87,512,87,515,87,520,87,523,87,526,87,543,87,549,87,551,87,554,87,557,87,560,87,562,87,565,87,568,87,570,87,572,87,575,87,578,87,580,87,583,87,585,87,588,87,591,87],{"style":191},[89,499,500,501,100,503,272],{"style":194},"\u003Cform id=",[95,502,269],{"style":268},[95,504,104],{"style":268},[89,506,507,508,100,510,272],{"style":209},"    \u003Casp:ScriptManager ID=",[95,509,278],{"style":268},[95,511,104],{"style":268},[89,513,514],{"style":194},"        \u003CServices>",[89,516,517,518,345],{"style":209},"            \u003Casp:ServiceReference Path=",[95,519,137],{"style":268},[89,521,522],{"style":194},"        \u003C\u002FServices>        ",[89,524,525],{"style":209},"    \u003C\u002Fasp:ScriptManager>",[89,527,528,529,100,532,305,534,309,536,539,540,345],{"style":194},"    \u003Casp:Button ID=",[95,530,531],{"style":268},"\"btnGet\"",[95,533,104],{"style":268},[95,535,389],{"style":268},[95,537,538],{"style":268},"\"Get\""," OnClientClick=",[95,541,542],{"style":268},"\"update();return false\"",[89,544,545,546,272],{"style":194},"    \u003Cscript type=",[95,547,548],{"style":268},"\"text\u002Fjavascript\"",[89,550,236],{"style":209},[89,552,553],{"style":194},"        function update() {",[89,555,556],{"style":209},"            MyWebService.HelloWorld(onCompleted, onFailed);",[89,558,559],{"style":194},"        }",[89,561,236],{"style":209},[89,563,564],{"style":194},"        function onCompleted(result, context, methodName) {",[89,566,567],{"style":209},"            alert(result);",[89,569,559],{"style":194},[89,571,236],{"style":209},[89,573,574],{"style":194},"        function onFailed(err, context, methodName) {",[89,576,577],{"style":209},"            alert(err.get_message());",[89,579,559],{"style":194},[89,581,582],{"style":194},"    \u003C\u002Fscript>",[89,584,236],{"style":209},[89,586,587],{"style":194},"\u003C\u002Fform>",[89,589,590],{"style":209},"dy>",[89,592,593],{"style":194},"ml>",[64,595,236],{},[64,597,598],{},"Page Method Example",[23,600,601,604],{},[26,602,603],{},"Allows javascript Ajax call back to page without web service",[26,605,606],{},"use EnablePageMethods=true in the ScriptManager control",[85,608,609],{},"  \nThe following is a sample showing a code behind static method marked with WebMethod attribute.  \n",[85,611,87,612,694,695,87,698,87],{},[186,613,87,615,87],{"style":614},"line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 86.84%; font-family: consolas, 'Courier New', courier, monospace; height: 210px; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: gray 1px solid; padding: 4px;",[186,616,87,617,87,628,87,632,87,642,87,646,87,651,87,655,87,659,87,664,87,679,87,686,87,690,87],{"style":191},[89,618,619],{"style":194},[64,620,621,199,623,199,625,627],{},[95,622,198],{"style":197},[95,624,202],{"style":197},[95,626,205],{"style":197}," PageMethod : System.Web.UI.Page",[89,629,630],{"style":209},[64,631,210],{},[89,633,634],{"style":194},[64,635,213,636,199,638,220,640,224],{},[95,637,216],{"style":197},[95,639,219],{"style":197},[95,641,223],{"style":197},[89,643,644],{"style":209},[64,645,227],{},[89,647,648],{"style":194},[64,649,650],{},"        Response.Write(DateTime.Now.ToString());",[89,652,653],{"style":209},[64,654,233],{},[89,656,657],{"style":194},[64,658,236],{},[89,660,661],{"style":209},[64,662,663],{},"    [System.Web.Services.WebMethod]",[89,665,666],{"style":194},[64,667,213,668,199,670,199,673,675,676,678],{},[95,669,198],{"style":197},[95,671,672],{"style":197},"static",[95,674,473],{"style":197}," update(",[95,677,473],{"style":197}," input){",[89,680,681],{"style":209},[64,682,477,683,685],{},[95,684,480],{"style":197}," input.ToUpper();",[89,687,688],{"style":194},[64,689,233],{},[89,691,692],{"style":209},[64,693,253],{},"  \nAspx code with a button that calls javascript, which in turn calls the page method ‘update’ to return uppercase string",[64,696,697],{},".",[186,699,87,701,87],{"style":700},"line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 88.59%; font-family: consolas, 'Courier New', courier, monospace; height: 210px; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: gray 1px solid; padding: 4px;",[186,702,87,703,87,723,87,740,87,756,87,767,87,778,87,799,87,832,87,870,87,874,87,891,87,900,87,912,87,924,87,937,87,945,87,955,87,963,87,970,87,978,87,988,87,998,87,1008,87],{"style":191},[89,704,705],{"style":194},[64,706,707,710,199,714,718,721],{},[95,708,709],{"style":197},"\u003C",[95,711,713],{"style":712},"color: #800000;","html",[95,715,717],{"style":716},"color: #ff0000;","xmlns",[95,719,720],{"style":197},"=\"http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml\"",[95,722,272],{"style":197},[89,724,725],{"style":209},[64,726,727,729,199,732,735,738],{},[95,728,709],{"style":197},[95,730,731],{"style":712},"head",[95,733,734],{"style":716},"runat",[95,736,737],{"style":197},"=\"server\"",[95,739,272],{"style":197},[89,741,742],{"style":194},[64,743,213,744,746,749,752,754],{},[95,745,709],{"style":197},[95,747,748],{"style":712},"title",[95,750,751],{"style":197},">\u003C\u002F",[95,753,748],{"style":712},[95,755,272],{"style":197},[89,757,758],{"style":209},[64,759,760,763,765],{},[95,761,762],{"style":197},"\u003C\u002F",[95,764,731],{"style":712},[95,766,272],{"style":197},[89,768,769],{"style":194},[64,770,771,773,776],{},[95,772,709],{"style":197},[95,774,775],{"style":712},"body",[95,777,272],{"style":197},[89,779,780],{"style":209},[64,781,213,782,784,199,787,790,199,793,795,797],{},[95,783,709],{"style":197},[95,785,786],{"style":712},"form",[95,788,789],{"style":716},"id",[95,791,792],{"style":197},"=\"form1\"",[95,794,734],{"style":716},[95,796,737],{"style":197},[95,798,272],{"style":197},[89,800,801],{"style":209},[64,802,213,803,805,199,808,811,199,814,816,199,818,821,199,824,827,199,829],{},[95,804,709],{"style":197},[95,806,807],{"style":712},"asp:ScriptManager",[95,809,810],{"style":716},"ID",[95,812,813],{"style":197},"=\"ScriptManager1\"",[95,815,734],{"style":716},[95,817,737],{"style":197},[95,819,820],{"style":716},"EnablePartialRendering",[95,822,823],{"style":197},"=\"true\"",[95,825,826],{"style":716},"EnablePageMethods",[95,828,823],{"style":197},[95,830,831],{"style":197},"\u002F>",[89,833,834],{"style":194},[64,835,213,836,838,199,841,843,199,846,848,199,850,853,199,856,859,199,862,865,199,868],{},[95,837,709],{"style":197},[95,839,840],{"style":712},"asp:Button",[95,842,810],{"style":716},[95,844,845],{"style":197},"=\"btnGet\"",[95,847,734],{"style":716},[95,849,737],{"style":197},[95,851,852],{"style":716},"CssClass",[95,854,855],{"style":197},"=\"btn\"",[95,857,858],{"style":716},"Text",[95,860,861],{"style":197},"=\"Get\"",[95,863,864],{"style":716},"OnClientClick",[95,866,867],{"style":197},"=\"update();return false\"",[95,869,831],{"style":197},[89,871,872],{"style":209},[64,873,236],{},[89,875,876],{"style":194},[64,877,477,878,880,199,883,886,889],{},[95,879,709],{"style":197},[95,881,882],{"style":712},"script",[95,884,885],{"style":716},"type",[95,887,888],{"style":197},"=\"text\u002Fjavascript\"",[95,890,272],{"style":197},[89,892,893],{"style":194},[64,894,895,899],{},[95,896,898],{"style":897},"color: #606060;","   1:","  ",[89,901,902],{"style":209},[64,903,904,907,908,911],{},[95,905,906],{"style":897},"   2:","             ",[95,909,910],{"style":197},"function"," update() {",[89,913,914],{"style":194},[64,915,916,919,920,923],{},[95,917,918],{"style":897},"   3:","                 PageMethods.update(",[95,921,922],{"style":268},"\"test\"",", onCompleted);",[89,925,926],{"style":209},[64,927,928,931,932,199,934,484],{},[95,929,930],{"style":897},"   4:","                 ",[95,933,480],{"style":197},[95,935,936],{"style":197},"false",[89,938,939],{"style":194},[64,940,941,944],{},[95,942,943],{"style":897},"   5:","             }",[89,946,947],{"style":209},[64,948,949,907,952,954],{},[95,950,951],{"style":897},"   6:",[95,953,910],{"style":197}," onCompleted(result) {",[89,956,957],{"style":194},[64,958,959,962],{},[95,960,961],{"style":897},"   7:","                 alert(result.toString());",[89,964,965],{"style":209},[64,966,967,944],{},[95,968,969],{"style":897},"   8:",[89,971,972],{"style":194},[64,973,974,977],{},[95,975,976],{"style":897},"   9:","         ",[89,979,980],{"style":194},[64,981,982,984,986],{},[95,983,762],{"style":197},[95,985,882],{"style":712},[95,987,272],{"style":197},[89,989,990],{"style":194},[64,991,213,992,994,996],{},[95,993,762],{"style":197},[95,995,786],{"style":712},[95,997,272],{"style":197},[89,999,1000],{"style":209},[64,1001,1002,1004,1006],{},[95,1003,762],{"style":197},[95,1005,775],{"style":712},[95,1007,272],{"style":197},[89,1009,1010],{"style":194},[64,1011,1012,1014,1016],{},[95,1013,762],{"style":197},[95,1015,713],{"style":712},[95,1017,272],{"style":197},[64,1019,236],{},[64,1021,1022],{},"HTTP Requests (from Javascript) Sample",[85,1024,87,1025],{},[23,1026,1027,1030],{},[26,1028,1029],{},"The async communication layer enables javascript to make a request over the network to any http end point by using Sys.Net.WebRequest class",[26,1031,1032],{},"The sample performs a post and get http request from javascript",[85,1034,1035,1036,1148,1149,1681,1682,1755,1756,87],{},"  \nPage code that initiates the javascript call GetWebRequest().  \n",[186,1037,87,1039,87],{"style":1038},"line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 86.48%; font-family: consolas, 'Courier New', courier, monospace; height: 210px; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: gray 1px solid; padding: 4px;",[186,1040,87,1041,87,1049,87,1053,87,1061,87,1066,87,1074,87,1079,87,1084,87,1088,87,1106,87,1123,87,1127,87,1136,87,1140,87,1144,87],{"style":191},[89,1042,1043],{"style":194},[64,1044,500,1045,100,1047,272],{},[95,1046,269],{"style":268},[95,1048,104],{"style":268},[89,1050,1051],{"style":209},[64,1052,236],{},[89,1054,1055],{"style":194},[64,1056,93,1057,100,1059,272],{},[95,1058,278],{"style":268},[95,1060,104],{"style":268},[89,1062,1063],{"style":209},[64,1064,1065],{},"    \u003CScripts>",[89,1067,1068],{"style":194},[64,1069,1070,1071,345],{},"        \u003Casp:ScriptReference Path=",[95,1072,1073],{"style":268},"\"~\u002Fconnect.js\"",[89,1075,1076],{"style":209},[64,1077,1078],{},"    \u003C\u002FScripts>",[89,1080,1081],{"style":194},[64,1082,1083],{},"\u003C\u002Fasp:ScriptManager>",[89,1085,1086],{"style":209},[64,1087,236],{},[89,1089,1090],{"style":209},[64,1091,1092,1093,100,1095,305,1097,309,1099,1102,1103,345],{},"\u003Casp:Button ID=",[95,1094,344],{"style":268},[95,1096,104],{"style":268},[95,1098,389],{"style":268},[95,1100,1101],{"style":268},"\"GetWebRequest\"","  OnClientClick=",[95,1104,1105],{"style":268},"\"GetWebRequest();return false;\"",[89,1107,1108],{"style":194},[64,1109,1092,1110,100,1113,305,1115,309,1117,539,1120,345],{},[95,1111,1112],{"style":268},"\"btnPost\"",[95,1114,104],{"style":268},[95,1116,389],{"style":268},[95,1118,1119],{"style":268},"\"PostWebRequest\"",[95,1121,1122],{"style":268},"\"PostWebRequest();return false;\"",[89,1124,1125],{"style":209},[64,1126,236],{},[89,1128,1129],{"style":194},[64,1130,1131,1132,1135],{},"\u003Cdiv id=",[95,1133,1134],{"style":268},"\"result\"",">initial content\u003C\u002Fdiv>",[89,1137,1138],{"style":209},[64,1139,236],{},[89,1141,1142],{"style":194},[64,1143,236],{},[89,1145,1146],{"style":209},[64,1147,587],{},"  \nJavascript (connect.js) file which performs the webrequest  \n",[186,1150,87,1152,87],{"style":1151},"line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 87.69%; font-family: consolas, 'Courier New', courier, monospace; height: 210px; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: gray 1px solid; padding: 4px;",[186,1153,87,1154,87,1162,87,1166,87,1171,87,1175,87,1180,87,1188,87,1192,87,1196,87,1201,87,1210,87,1217,87,1226,87,1233,87,1241,87,1248,87,1252,87,1259,87,1267,87,1274,87,1279,87,1286,87,1293,87,1297,87,1304,87,1309,87,1313,87,1317,87,1324,87,1329,87,1336,87,1340,87,1346,87,1352,87,1356,87,1362,87,1369,87,1376,87,1380,87,1386,87,1393,87,1397,87,1404,87,1408,87,1412,87,1419,87,1424,87,1431,87,1436,87,1445,87,1450,87,1454,87,1460,87,1466,87,1470,87,1476,87,1481,87,1485,87,1489,87,1493,87,1500,87,1507,87,1514,87,1519,87,1527,87,1534,87,1541,87,1545,87,1552,87,1557,87,1570,87,1582,87,1586,87,1593,87,1601,87,1608,87,1612,87,1619,87,1626,87,1630,87,1637,87,1642,87,1649,87,1654,87,1658,87,1662,87,1666,87],{"style":191},[89,1155,1156],{"style":194},[95,1157,1159],{"style":1158},"color: #008000;",[64,1160,1161],{},"\u002F\u002F connect.js",[89,1163,1164],{"style":209},[64,1165,236],{},[89,1167,1168],{"style":194},[64,1169,1170],{},"var resultElement;",[89,1172,1173],{"style":209},[64,1174,236],{},[89,1176,1177],{"style":194},[64,1178,1179],{},"function pageLoad() {",[89,1181,1182],{"style":209},[64,1183,1184,1185,1187],{},"    resultElement = $get(",[95,1186,1134],{"style":268},");    ",[89,1189,1190],{"style":194},[64,1191,253],{},[89,1193,1194],{"style":209},[64,1195,236],{},[89,1197,1198],{"style":194},[64,1199,1200],{},"function GetWebRequest() {",[89,1202,1203],{"style":209},[64,1204,1205,1206,1209],{},"    alert(",[95,1207,1208],{"style":268},"\"performing web request\"",");",[89,1211,1212],{"style":209},[64,1213,213,1214],{},[95,1215,1216],{"style":1158},"\u002F\u002F Instantiate a WebRequest.",[89,1218,1219],{"style":194},[64,1220,1221,1222,1225],{},"    var wRequest = ",[95,1223,1224],{"style":197},"new"," Sys.Net.WebRequest();",[89,1227,1228],{"style":194},[64,1229,213,1230],{},[95,1231,1232],{"style":1158},"\u002F\u002F Set the request URL.      ",[89,1234,1235],{"style":209},[64,1236,1237,1238,1209],{},"    wRequest.set_url(",[95,1239,1240],{"style":268},"\"getTarget.htm\"",[89,1242,1243],{"style":194},[64,1244,1205,1245,1209],{},[95,1246,1247],{"style":268},"\"Target Url: getTarget.htm\"",[89,1249,1250],{"style":209},[64,1251,236],{},[89,1253,1254],{"style":194},[64,1255,213,1256],{},[95,1257,1258],{"style":1158},"\u002F\u002F Set the request verb.",[89,1260,1261],{"style":209},[64,1262,1263,1264,1209],{},"    wRequest.set_httpVerb(",[95,1265,1266],{"style":268},"\"GET\"",[89,1268,1269],{"style":209},[64,1270,213,1271],{},[95,1272,1273],{"style":1158},"\u002F\u002F Set the request callback function.",[89,1275,1276],{"style":194},[64,1277,1278],{},"    wRequest.add_completed(OnWebRequestCompleted);",[89,1280,1281],{"style":194},[64,1282,213,1283],{},[95,1284,1285],{"style":1158},"\u002F\u002F Clear the results area.",[89,1287,1288],{"style":209},[64,1289,1290,1291,484],{},"    resultElement.innerHTML = ",[95,1292,312],{"style":268},[89,1294,1295],{"style":194},[64,1296,236],{},[89,1298,1299],{"style":209},[64,1300,213,1301],{},[95,1302,1303],{"style":1158},"\u002F\u002F Execute the request.",[89,1305,1306],{"style":194},[64,1307,1308],{},"    wRequest.invoke();      ",[89,1310,1311],{"style":209},[64,1312,253],{},[89,1314,1315],{"style":194},[64,1316,236],{},[89,1318,1319],{"style":209},[95,1320,1321],{"style":1158},[64,1322,1323],{},"\u002F\u002F This function performs a POST Web request.",[89,1325,1326],{"style":194},[64,1327,1328],{},"function PostWebRequest() {",[89,1330,1331],{"style":209},[64,1332,1205,1333,1209],{},[95,1334,1335],{"style":268},"\"Performing Post Web request.\"",[89,1337,1338],{"style":194},[64,1339,236],{},[89,1341,1342],{"style":209},[64,1343,213,1344],{},[95,1345,1216],{"style":1158},[89,1347,1348],{"style":194},[64,1349,1221,1350,1225],{},[95,1351,1224],{"style":197},[89,1353,1354],{"style":209},[64,1355,236],{},[89,1357,1358],{"style":194},[64,1359,213,1360],{},[95,1361,1232],{"style":1158},[89,1363,1364],{"style":209},[64,1365,1237,1366,1209],{},[95,1367,1368],{"style":268},"\"postTarget.aspx\"",[89,1370,1371],{"style":194},[64,1372,1205,1373,1209],{},[95,1374,1375],{"style":268},"\"Target Url: postTarget.aspx\"",[89,1377,1378],{"style":209},[64,1379,236],{},[89,1381,1382],{"style":194},[64,1383,213,1384],{},[95,1385,1258],{"style":1158},[89,1387,1388],{"style":209},[64,1389,1263,1390,1209],{},[95,1391,1392],{"style":268},"\"POST\"",[89,1394,1395],{"style":194},[64,1396,236],{},[89,1398,1399],{"style":209},[64,1400,213,1401],{},[95,1402,1403],{"style":1158},"\u002F\u002F Set the request handler.",[89,1405,1406],{"style":194},[64,1407,1278],{},[89,1409,1410],{"style":209},[64,1411,236],{},[89,1413,1414],{"style":194},[64,1415,213,1416],{},[95,1417,1418],{"style":1158},"\u002F\u002F Set the body for he POST.",[89,1420,1421],{"style":209},[64,1422,1423],{},"    var requestBody =",[89,1425,1426],{"style":194},[64,1427,477,1428,484],{},[95,1429,1430],{"style":268},"\"Message=Hello! Do you hear me?\"",[89,1432,1433],{"style":209},[64,1434,1435],{},"    wRequest.set_body(requestBody);",[89,1437,1438],{"style":194},[64,1439,1440,1441,1444],{},"    wRequest.get_headers()[",[95,1442,1443],{"style":268},"\"Content-Length\"","] =",[89,1446,1447],{"style":209},[64,1448,1449],{},"        requestBody.length;",[89,1451,1452],{"style":194},[64,1453,236],{},[89,1455,1456],{"style":209},[64,1457,213,1458],{},[95,1459,1285],{"style":1158},[89,1461,1462],{"style":194},[64,1463,1290,1464,484],{},[95,1465,312],{"style":268},[89,1467,1468],{"style":209},[64,1469,236],{},[89,1471,1472],{"style":194},[64,1473,213,1474],{},[95,1475,1303],{"style":1158},[89,1477,1478],{"style":209},[64,1479,1480],{},"    wRequest.invoke();",[89,1482,1483],{"style":194},[64,1484,253],{},[89,1486,1487],{"style":209},[64,1488,236],{},[89,1490,1491],{"style":194},[64,1492,236],{},[89,1494,1495],{"style":209},[95,1496,1497],{"style":1158},[64,1498,1499],{},"\u002F\u002F This callback function processes the ",[89,1501,1502],{"style":194},[95,1503,1504],{"style":1158},[64,1505,1506],{},"\u002F\u002F request return values. It is called asynchronously ",[89,1508,1509],{"style":209},[95,1510,1511],{"style":1158},[64,1512,1513],{},"\u002F\u002F by the current executor.",[89,1515,1516],{"style":194},[64,1517,1518],{},"function OnWebRequestCompleted(executor, eventArgs) {",[89,1520,1521],{"style":209},[64,1522,213,1523,1526],{},[95,1524,1525],{"style":197},"if"," (executor.get_responseAvailable()) {",[89,1528,1529],{"style":194},[64,1530,477,1531],{},[95,1532,1533],{"style":1158},"\u002F\u002F Clear the previous results. ",[89,1535,1536],{"style":209},[64,1537,1538,1539,484],{},"        resultElement.innerHTML = ",[95,1540,312],{"style":268},[89,1542,1543],{"style":194},[64,1544,236],{},[89,1546,1547],{"style":209},[64,1548,477,1549],{},[95,1550,1551],{"style":1158},"\u002F\u002F Display Web request status. ",[89,1553,1554],{"style":194},[64,1555,1556],{},"        resultElement.innerHTML +=",[89,1558,1559],{"style":209},[64,1560,1561,1562,1565,1566,1569],{},"          ",[95,1563,1564],{"style":268},"\"Status: [\""," + executor.get_statusCode() + ",[95,1567,1568],{"style":268},"\" \""," +",[89,1571,1572],{"style":194},[64,1573,1574,1575,1578,1579,484],{},"                    executor.get_statusText() + ",[95,1576,1577],{"style":268},"\"]\""," + ",[95,1580,1581],{"style":268},"\"\u003Cbr\u002F>\"",[89,1583,1584],{"style":209},[64,1585,236],{},[89,1587,1588],{"style":194},[64,1589,477,1590],{},[95,1591,1592],{"style":1158},"\u002F\u002F Display Web request headers.",[89,1594,1595],{"style":209},[64,1596,1597,1598,484],{},"        resultElement.innerHTML += ",[95,1599,1600],{"style":268},"\"Headers: \"",[89,1602,1603],{"style":194},[64,1604,1605,1606,484],{},"        resultElement.innerHTML += executor.getAllResponseHeaders() + ",[95,1607,1581],{"style":268},[89,1609,1610],{"style":209},[64,1611,236],{},[89,1613,1614],{"style":194},[64,1615,477,1616],{},[95,1617,1618],{"style":1158},"\u002F\u002F Display Web request body.",[89,1620,1621],{"style":209},[64,1622,1556,1623,484],{},[95,1624,1625],{"style":268},"\"Body:\"",[89,1627,1628],{"style":194},[64,1629,236],{},[89,1631,1632],{"style":209},[64,1633,477,1634,1636],{},[95,1635,1525],{"style":197}," (document.all)",[89,1638,1639],{"style":194},[64,1640,1641],{},"            resultElement.innerText += executor.get_responseData();",[89,1643,1644],{"style":209},[64,1645,477,1646],{},[95,1647,1648],{"style":197},"else",[89,1650,1651],{"style":194},[64,1652,1653],{},"            resultElement.textContent += executor.get_responseData();",[89,1655,1656],{"style":209},[64,1657,233],{},[89,1659,1660],{"style":194},[64,1661,236],{},[89,1663,1664],{"style":209},[64,1665,253],{},[89,1667,1668],{"style":194},[64,1669,1670,1672,1673,1676,1677,1680],{},[95,1671,1525],{"style":197}," (",[95,1674,1675],{"style":197},"typeof"," (Sys) !== ",[95,1678,1679],{"style":268},"\"undefined\"",") Sys.Application.notifyScriptLoaded();","  \nTarget Html file used in the Get  \n",[186,1683,87,1685,87],{"style":1684},"line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 88.16%; font-family: consolas, 'Courier New', courier, monospace; height: 210px; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: gray 1px solid; padding: 4px;",[186,1686,87,1687,87,1698,87,1707,87,1712,87,1717,87,1722,87,1726,87,1731,87,1736,87,1741,87,1746,87,1750,87],{"style":191},[89,1688,1689],{"style":194},[64,1690,1691,1692,199,1695,272],{},"\u003C!DOCTYPE html PUBLIC ",[95,1693,1694],{"style":268},"\"-\u002F\u002FW3C\u002F\u002FDTD XHTML 1.0 Transitional\u002F\u002FEN\"",[95,1696,1697],{"style":268},"\"http:\u002F\u002Fwww.w3.org\u002FTR\u002Fxhtml1\u002FDTD\u002Fxhtml1-transitional.dtd\"",[89,1699,1700],{"style":209},[64,1701,1702,1703,1706],{},"\u003Chtml xmlns=",[95,1704,1705],{"style":268},"\"http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml\""," >",[89,1708,1709],{"style":194},[64,1710,1711],{},"\u003Chead>",[89,1713,1714],{"style":209},[64,1715,1716],{},"    \u003Ctitle>Hello Page\u003C\u002Ftitle>",[89,1718,1719],{"style":194},[64,1720,1721],{},"\u003C\u002Fhead>",[89,1723,1724],{"style":209},[64,1725,262],{},[89,1727,1728],{"style":194},[64,1729,1730],{},"    \u003Cp> ",[89,1732,1733],{"style":209},[64,1734,1735],{},"        Hello there. ",[89,1737,1738],{"style":194},[64,1739,1740],{},"        I got your GET Web request!",[89,1742,1743],{"style":209},[64,1744,1745],{},"    \u003C\u002Fp>",[89,1747,1748],{"style":194},[64,1749,398],{},[89,1751,1752],{"style":209},[64,1753,1754],{},"\u003C\u002Fhtml>","  \nPost Aspx Page  \n",[186,1757,87,1758,87],{"style":700},[186,1759,87,1760,87,1772,87,1776,87,1784,87,1788,87,1794,87,1804,87,1809,87,1818,87,1828,87,1833,87,1849,87,1854,87,1862,87,1866,87,1870,87,1874,87,1878,87,1882,87,1890,87,1895,87,1900,87,1905,87,1914,87,1923,87,1928,87,1933,87,1938,87,1942,87,1946,87],{"style":191},[89,1761,1762],{"style":194},[64,1763,1764,1765,1768,1769,1771],{},"\u003C%@ Page Language=",[95,1766,1767],{"style":268},"\"C#\""," AutoEventWireup=",[95,1770,284],{"style":268},"  %>",[89,1773,1774],{"style":209},[64,1775,236],{},[89,1777,1778],{"style":194},[64,1779,1691,1780,199,1782,272],{},[95,1781,1694],{"style":268},[95,1783,1697],{"style":268},[89,1785,1786],{"style":209},[64,1787,236],{},[89,1789,1790],{"style":194},[64,1791,1702,1792,1706],{},[95,1793,1705],{"style":268},[89,1795,1796],{"style":209},[64,1797,1798,1799,100,1802,272],{},"\u003Chead id=",[95,1800,1801],{"style":268},"\"Head1\"",[95,1803,104],{"style":268},[89,1805,1806],{"style":194},[64,1807,1808],{},"    \u003Ctitle>Post Target\u003C\u002Ftitle>",[89,1810,1811],{"style":194},[64,1812,1813,1814,100,1816,272],{},"    \u003Cscript language=",[95,1815,1767],{"style":268},[95,1817,104],{"style":268},[89,1819,1820],{"style":194},[64,1821,477,1822,199,1824,220,1826,224],{},[95,1823,216],{"style":197},[95,1825,219],{"style":197},[95,1827,223],{"style":197},[89,1829,1830],{"style":209},[64,1831,1832],{},"        {",[89,1834,1835],{"style":194},[64,1836,1837,1838,1840,1841,1844,1845,1848],{},"            ",[95,1839,1525],{"style":197}," (HttpContext.Current.Request.Form[",[95,1842,1843],{"style":268},"\"Message\"","] != ",[95,1846,1847],{"style":197},"null",")",[89,1850,1851],{"style":209},[64,1852,1853],{},"                LabelID.Text = ",[89,1855,1856],{"style":194},[64,1857,1858,1859,1861],{},"                    HttpContext.Current.Request.Form[",[95,1860,1843],{"style":268},"].ToString();",[89,1863,1864],{"style":209},[64,1865,559],{},[89,1867,1868],{"style":209},[64,1869,582],{},[89,1871,1872],{"style":194},[64,1873,236],{},[89,1875,1876],{"style":209},[64,1877,1721],{},[89,1879,1880],{"style":194},[64,1881,262],{},[89,1883,1884],{"style":209},[64,1885,265,1886,100,1888,272],{},[95,1887,269],{"style":268},[95,1889,104],{"style":268},[89,1891,1892],{"style":194},[64,1893,1894],{},"    \u003Cdiv>",[89,1896,1897],{"style":209},[64,1898,1899],{},"        \u003Ch1>WebRequestPost Target\u003C\u002Fh1>",[89,1901,1902],{"style":209},[64,1903,1904],{},"        \u003Cp>",[89,1906,1907],{"style":194},[64,1908,1909,1910,1913],{},"            \u003Casp:Textbox id=",[95,1911,1912],{"style":268},"\"LabelID\"","  ",[89,1915,1916],{"style":209},[64,1917,1918,1919,100,1921,831],{},"                Text=",[95,1920,922],{"style":268},[95,1922,104],{"style":268},[89,1924,1925],{"style":194},[64,1926,1927],{},"        \u003C\u002Fp>",[89,1929,1930],{"style":194},[64,1931,1932],{},"        Yes, I got your POST Web request!",[89,1934,1935],{"style":194},[64,1936,1937],{},"    \u003C\u002Fdiv>",[89,1939,1940],{"style":209},[64,1941,395],{},[89,1943,1944],{"style":194},[64,1945,398],{},[89,1947,1948],{"style":209},[64,1949,1754],{},[1951,1952],"img",{"style":1953,"src":1954,"alt":1955},"display: none;","\u002Farticles\u002Fimages\u002Fajax.png","",{"title":1955,"searchDepth":1957,"depth":1957,"links":1958},2,[],"2015-04-20T08:07:16.5000000-04:00","There are many options within the Microsoft stack of products for AJAX type functionality.  The following article covers the primary mechanisms that utilize the Microsoft out of the box Ajax functionality.  Ajax must be one of the technologies used in all current web applications.  The primary benefit is the improved user experience by providing quick, responsive feedback. Core features include Ajax Client Libraries and Ajax Server Controls.","md",{},true,"\u002Farticles\u002Fmicrosoft-ajax-features-and-implementation-samples",{"title":6,"description":1960},"articles\u002Fmicrosoft-ajax-features-and-implementation-samples",[1968],"aspnet","z4UUBACfZQdvJHc_1kqU_wGEoJgjO1kJ2Q4ROa2yb4M",[1971],{"id":1972,"title":1973,"body":1974,"description":1978,"extension":1961,"img":1979,"meta":1980,"name":1968,"navigation":1963,"path":1981,"seo":1982,"stem":1983,"__hash__":1984},"tags\u002Ftags\u002Faspnet.md","Aspnet",{"type":9,"value":1975,"toc":1976},[],{"title":1955,"searchDepth":1957,"depth":1957,"links":1977},[],"ASP.NET is an open source web framework, created by Microsoft, for building modern web apps and services with .NET.","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1598313183973-4effcded8d5e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=675&q=80",{},"\u002Ftags\u002Faspnet",{"description":1978},"tags\u002Faspnet","SlUGLdZWQy8mYOWC6OetgJkwVulWNURoVHeuESIDleI",{"id":1986,"title":1987,"author":7,"body":1988,"createdAt":2079,"description":2080,"extension":1961,"img":2081,"meta":2082,"navigation":1963,"path":2083,"seo":2084,"stem":2085,"tags":2086,"updatedAt":2079,"__hash__":2087},"articles\u002Farticles\u002Fasp-net-2-0-compilation-again.md","ASPNET 2 Compilation Again",{"type":9,"value":1989,"toc":2077},[1990,1993,2004],[12,1991,1992],{},"There are a few ways of deploying a .NET 2.0 ASP.NET application",[23,1994,1995,1998,2001],{},[26,1996,1997],{},"using Web Site Deployment Project",[26,1999,2000],{},"using VS.NET Publish Command",[26,2002,2003],{},"using VS.NET Build Command",[12,2005,2006,2007,2009,2010,2013,2014,2016,2017,2019,2020,2022,2023,2026,2027,2030,2031,2033,2045,2047,2048,2050,2051,2016,2053,2055,2059,2061,2064,2065,2067,2070,2071,2073,2076],{},"1.) Using VS.NET Build",[19,2008],{},"\nASP.NET not Visual Studio performs the build.  ASP.NET builds everything, including .cs and .vb code files and places all resulting assemblies in folder structure under Temporary ASP.NET files directory.  As ASP.NET does all of the compilation, the debug setting in the compilation section of the ",[64,2011,2012],{},"web.config controls debug or release mode",".  Compile with debug=true and you'll find the .pdb debugging symbol files alongside each assembly.  In this scenario the Configuration Manager is obsolete (not used) and as such the only option is 'Debug'.",[19,2015],{},"\n ",[19,2018],{},"\n2.) Using VS.NET Publish",[19,2021],{},"\nThis option is available when you are ready to publish to production.  The Publish command will precompile a web application and place the results into a director of your choosing (IIS\u002FFTP\u002FDirectory).  Options are available on the Publish dialog box that map to aspnet_compiler switches.  The aspnet_compiler tool has option to create pdb files however this is not available on the dialog box (within vs.net).  Publish always builds in ",[64,2024,2025],{},"release ","mode without pdb files.  The Publish command does ",[64,2028,2029],{},"not change the debug setting in the web.config"," SO if you precompile and updateable (option 'allow this precompiled site to be updateable') web site and then update the web site in place (which will result in a dynamic compilation) those dynamic compilations will produce debug code and pdb files.",[19,2032],{},[2034,2035,2037],"a",{"href":2036},"\u002Farticles\u002Fimages\u002FWindowsLiveWriter\u002FASP.NET2.0CompilationAgain_A80B\u002Fimage_2.png",[1951,2038],{"style":2039,"src":2040,"border":2041,"alt":2042,"width":2043,"height":2044},"border-width: 0px;","\u002Farticles\u002Fimages\u002FWindowsLiveWriter\u002FASP.NET2.0CompilationAgain_A80B\u002Fimage_thumb.png",0,"image",244,176,[19,2046],{},"\n3.) Using Web Site Deployment Project (WSD)",[19,2049],{},"\nThis project allows VS.NET to use MSBUILD files provided by WSD to ask for debug and release builds.  This tool uses the aspnet_compiler similar to above with the Publish option however the WSD option will change the debug setting in the web.config to false for release builds (different than the Publish option)  By default the built files will be in respective debug or release directories.",[19,2052],{},[19,2054],{},[95,2056,2058],{"style":2057},"text-decoration: underline;","Conclusion",[19,2060],{},[64,2062,2063],{},"VS.NET Build"," - builds web site to Temporary ASP.NET files directory with options specified in web.config",[19,2066],{},[64,2068,2069],{},"VS.NET Publish"," - builds to release mode (always) however does not change the compilation mode in web.config file (which can lead to less than optimum performance if site is dynamically recompiled)",[19,2072],{},[64,2074,2075],{},"Web Deployment Project"," - Builds based on Configuration Manager mode (debug\u002Frelease) AND updates the web.config with additional options for creating debug symbols and swapping out web.config sections based on release mode",{"title":1955,"searchDepth":1957,"depth":1957,"links":2078},[],"2015-04-20T08:07:16.6100000-04:00","few ways of deploying a .NET 2.0 ASP.NET application.","\u002Farticles\u002Fimages\u002Fimage_thumb.png",{},"\u002Farticles\u002Fasp-net-2-0-compilation-again",{"title":1987,"description":2080},"articles\u002Fasp-net-2-0-compilation-again",[1968],"Q7K6EcEId9aFUHSq2rTPkmqg7nFfMagSzSQpOK5YPu4",{"id":2089,"title":2090,"author":7,"body":2091,"createdAt":2261,"description":2262,"extension":1961,"img":2257,"meta":2263,"navigation":1963,"path":2264,"seo":2265,"stem":2266,"tags":2267,"updatedAt":2261,"__hash__":2269},"articles\u002Farticles\u002Flist-indexes-in-sql-server.md","List Indexes in SQL Server",{"type":9,"value":2092,"toc":2259},[2093,2104,2246,2251,2253,2255],[12,2094,2095,2096,2099,2100,2103],{},"The following SQL will list all indexes in within the database that you run the sql script.  I was looking for the option within Visual Studio - Data Dude add-on that displayed index differences between two databases.  I eventually discovered the line by line index comparison by exploding the Table-Indexes ",[64,2097,2098],{},"however"," I was unable to create the newly added script index in the 2nd database.  ",[64,2101,2102],{},"Is this possible? ","  In lieu of the shortcomings within Data-Dude I used the following script to manually compare and script the indexes in both databases.",[89,2105,2107,2112,2113,2117,2118,2120,2124,2126,2130,2131,2133,2137,2138,2140,2144,2145,2149,2151,2155,2156,2160,2161,2174,2234],{"className":2106},[92],[95,2108,2111],{"className":2109},[2110],"kwrd","DECLARE"," GetTables ",[95,2114,2116],{"className":2115},[2110],"CURSOR"," READ_ONLY",[19,2119],{},[95,2121,2123],{"className":2122},[2110],"FOR",[19,2125],{},[95,2127,2129],{"className":2128},[2110],"  SELECT"," TABLE_NAME",[19,2132],{},[95,2134,2136],{"className":2135},[2110],"  FROM"," INFORMATION_SCHEMA.TABLES",[19,2139],{},[95,2141,2143],{"className":2142},[2110],"  WHERE"," TABLE_TYPE = ",[95,2146,2148],{"className":2147},[98],"'BASE TABLE'",[19,2150],{},[95,2152,2154],{"className":2153},[2110],"  AND"," OBJECTPROPERTY (OBJECT_ID(TABLE_NAME), ",[95,2157,2159],{"className":2158},[98],"'IsMSShipped'",") = 0",[12,2162,2163,2166,2167,2169,2173],{},[95,2164,2111],{"className":2165},[2110]," @TableName sysname",[19,2168],{},[95,2170,2172],{"className":2171},[2110],"OPEN"," GetTables",[12,2175,2176,199,2180,199,2184,2112,2188,2192,2193,2195,2199,2200,2202,2206,2208,2212,2213,2215,199,2219,199,2222,2112,2225,2192,2228,2230],{},[95,2177,2179],{"className":2178},[2110],"FETCH",[95,2181,2183],{"className":2182},[2110],"NEXT",[95,2185,2187],{"className":2186},[2110],"FROM",[95,2189,2191],{"className":2190},[2110],"INTO"," @TableName",[19,2194],{},[95,2196,2198],{"className":2197},[2110],"WHILE"," (@@fetch_status = 0)",[19,2201],{},[95,2203,2205],{"className":2204},[2110],"BEGIN",[19,2207],{},[95,2209,2211],{"className":2210},[2110],"  EXEC"," sp_helpindex @TableName",[19,2214],{},[95,2216,2218],{"className":2217},[2110],"  FETCH",[95,2220,2183],{"className":2221},[2110],[95,2223,2187],{"className":2224},[2110],[95,2226,2191],{"className":2227},[2110],[19,2229],{},[95,2231,2233],{"className":2232},[2110],"END",[12,2235,2236,2173,2240,2242,2173],{},[95,2237,2239],{"className":2238},[2110],"CLOSE",[19,2241],{},[95,2243,2245],{"className":2244},[2110],"DEALLOCATE",[2247,2248,2250],"style",{"type":2249},"text\u002Fcss","\u003C![CDATA[csharpcode, .csharpcode pre  \n{  \n    font-size: small;  \n    color: black;  \n    font-family: consolas, \"Courier New\", courier, monospace;  \n    background-color: #ffffff;  \n    \u002F*white-space: pre;*\u002F  \n}  \n.csharpcode pre { margin: 0em; }  \n.csharpcode .rem { color: #008000; }  \n.csharpcode .kwrd { color: #0000ff; }  \n.csharpcode .str { color: #006080; }  \n.csharpcode .op { color: #0000c0; }  \n.csharpcode .preproc { color: #cc6633; }  \n.csharpcode .asp { background-color: #ffff00; }  \n.csharpcode .html { color: #800000; }  \n.csharpcode .attr { color: #ff0000; }  \n.csharpcode .alt   \n{  \n    background-color: #f4f4f4;  \n    width: 100%;  \n    margin: 0em;  \n}  \n.csharpcode .lnum { color: #606060; }  \n]]>",[2247,2252,2250],{"type":2249},[2247,2254,2250],{"type":2249},[1951,2256],{"src":2257,"alt":1955,"style":2258},"\u002Farticles\u002Fimages\u002Fsql2.gif","display:none;",{"title":1955,"searchDepth":1957,"depth":1957,"links":2260},[],"2015-04-20T08:07:16.3900000-04:00",null,{},"\u002Farticles\u002Flist-indexes-in-sql-server",{"title":2090,"description":2262},"articles\u002Flist-indexes-in-sql-server",[2268],"sqlserver","PGhMpQ4KuNvCDC6fMPyQW3tunnAqa0GtOS8pvrjfWbo",1781574762119]