[{"data":1,"prerenderedAt":2279},["ShallowReactive",2],{"article-asp-net-updatepanel-updateprogress-controls-and-overlays-wait-messages":3},{"article":4,"tags":1271,"previous":1286,"next":1580},{"id":5,"title":6,"author":7,"body":8,"createdAt":1260,"description":1261,"extension":1262,"img":1255,"meta":1263,"navigation":1264,"path":1265,"seo":1266,"stem":1267,"tags":1268,"updatedAt":1260,"__hash__":1270},"articles\u002Farticles\u002Fasp-net-updatepanel-updateprogress-controls-and-overlays-wait-messages.md","Asp.net UpdatePanel, UpdateProgress Controls and Overlays (Wait Messages)","[object Object]",{"type":9,"value":10,"toc":1257},"minimark",[11,19,36,42,45,318,414,567,715,717,777,779,781,862,884,887,938,941,1251],[12,13,14,18],"p",{},[15,16,17],"strong",{},"Scenario",": While a partial page postback is occurring disable all form fields and give the user a pleasant please wait message that can be used consistently across your application.  We need to create an overlay that works in conjunction with the updatepanel as well as direct from JavaScript.",[12,20,21,24,25,28,29,32,35],{},[15,22,23],{},"Problem",": Design the update progress html and css so that the entire page is overlaid with gray background.  This works pretty good ",[15,26,27],{},"until scrolling"," ",[15,30,31],{},"on the page is involved.  When the page is tall enough that the browser scrolls the overlay must by sized dynamically with each post.  If you fail to do this, you will end up with odd visual with the overlay only covering a portion of the page.",[33,34],"br",{},"\nThe problem above is resolved in the solution described within this post.  It covers the asp.net, html, css and JavaScript code to accomplish the above in re-usable fashion.",[12,37,38,39,41],{},"I was using the UpdatePanel control which enables you to build rich, client-centric web applications.  By using the UpdatePanel controls you can refresh selected parts of the page instead of refreshing the whole page with a postback.  While the partial page post back occurs an UpdateProgress control is available to provide the user with a friendly ‘please wait’ message.  This all works seamlessly out of the box. ",[33,40],{},"\nIn my scenario I needed to overlay and disable all controls (make unavailable) for the user while the partial page update happens.  The application allows for file uploads (which cannot participate in partial page updates).  A full post back must occur for this to work correctly. ",[12,43,44],{},"My ASPX page has the following structure with typical UpdatePanel, ContentTemplate, Triggers and UpdateProgress controls.  The trigger designates that the btnSubmitAdmin will perform a full postback.  I want the full postback user interaction to look similar as the partial page updates.  As a result, I will be using the same updateprogress visual for both partial and full postbacks.",[46,47,50,51,50],"div",{"id":48,"style":49},"codeSnippetWrapper","text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 94.2%; font-family: 'Courier New', courier, monospace; direction: ltr; height: 374px; max-height: 500px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;","  \n",[46,52,50,55,50,50,78,50,50,100,50,28,50,131,50,50,156,50,28,50,167,50,28,50,175,50,50,186,50,50,195,50,50,212,50,50,221,50,28,50,231,50,50,265,50,50,274,50,50,294,50,50,302,50,50,310,50],{"id":53,"style":54},"codeSnippet","text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;",[56,57,59,64,28,68,72,75],"pre",{"style":58},"text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;",[60,61,63],"span",{"style":62},"color: #0000ff;","\u003C",[60,65,67],{"style":66},"color: #800000;","body",[60,69,71],{"style":70},"color: #ff0000;","onload",[60,73,74],{"style":62},"=\"fncOnLoad()\"",[60,76,77],{"style":62},">",[56,79,81,83,28,86,89,28,92,95,98],{"style":80},"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;",[60,82,63],{"style":62},[60,84,85],{"style":66},"form",[60,87,88],{"style":70},"id",[60,90,91],{"style":62},"=\"form1\"",[60,93,94],{"style":70},"runat",[60,96,97],{"style":62},"=\"server\"",[60,99,77],{"style":62},[56,101,102,103,105,28,108,111,28,114,116,28,118,121,124,127,129],{"style":58},"    ",[60,104,63],{"style":62},[60,106,107],{"style":66},"asp:ScriptManager",[60,109,110],{"style":70},"ID",[60,112,113],{"style":62},"=\"Scriptmanager1\"",[60,115,94],{"style":70},[60,117,97],{"style":62},[60,119,120],{"style":70},"EnablePartialRendering",[60,122,123],{"style":62},"=\"true\"",[60,125,126],{"style":62},">\u003C\u002F",[60,128,107],{"style":66},[60,130,77],{"style":62},[56,132,102,133,135,28,138,140,28,143,145,147,148,151,28,154],{"style":58},[60,134,63],{"style":62},[60,136,137],{"style":66},"asp:UpdatePanel",[60,139,110],{"style":70},[60,141,142],{"style":62},"=\"updatePanel1\"",[60,144,94],{"style":70},[60,146,97],{"style":62},"  ",[60,149,150],{"style":70},"UpdateMode",[60,152,153],{"style":62},"=\"Conditional\"",[60,155,77],{"style":62},[56,157,158,159,161,164,166],{"style":80},"       ",[60,160,63],{"style":62},[60,162,163],{"style":66},"ContentTemplate",[60,165,77],{"style":62},"               ",[56,168,169,170,174],{"style":80},"        ",[60,171,173],{"style":172},"color: #008000;","\u003C!-- Content Goes Here -->","                ",[56,176,177,178,181,183,185],{"style":80},"          ",[60,179,180],{"style":62},"\u003C\u002F",[60,182,163],{"style":66},[60,184,77],{"style":62},"              ",[56,187,169,188,190,193],{"style":58},[60,189,63],{"style":62},[60,191,192],{"style":66},"Triggers",[60,194,77],{"style":62},[56,196,197,198,200,28,203,206,28,209,197],{"style":80},"            ",[60,199,63],{"style":62},[60,201,202],{"style":66},"asp:PostBackTrigger",[60,204,205],{"style":70},"ControlID",[60,207,208],{"style":62},"=\"btnSubmitAdmin\"",[60,210,211],{"style":62},"\u002F>",[56,213,169,214,216,218,220],{"style":58},[60,215,180],{"style":62},[60,217,192],{"style":66},[60,219,77],{"style":62},"     ",[56,222,223,224,226,228,230],{"style":80},"   ",[60,225,180],{"style":62},[60,227,137],{"style":66},[60,229,77],{"style":62},"                    ",[56,232,223,233,235,28,238,240,28,243,245,28,247,250,28,252,255,28,257,260,263],{"style":80},[60,234,63],{"style":62},[60,236,237],{"style":66},"asp:UpdateProgress",[60,239,110],{"style":70},[60,241,242],{"style":62},"=\"UpdateProgress1\"",[60,244,94],{"style":70},[60,246,97],{"style":62},[60,248,249],{"style":70},"AssociatedUpdatePanelID",[60,251,142],{"style":62},[60,253,254],{"style":70},"DynamicLayout",[60,256,123],{"style":62},[60,258,259],{"style":70},"DisplayAfter",[60,261,262],{"style":62},"=\"1000\"",[60,264,77],{"style":62},[56,266,169,267,269,28,272],{"style":58},[60,268,63],{"style":62},[60,270,271],{"style":66},"ProgressTemplate",[60,273,77],{"style":62},[56,275,277,278,280,28,283,285,28,288,290,28,292],{"style":276},"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; height: 18px; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;","             ",[60,279,63],{"style":62},[60,281,282],{"style":66},"uc1:WaitPanel",[60,284,110],{"style":70},[60,286,287],{"style":62},"=\"WaitPanel1\"",[60,289,94],{"style":70},[60,291,97],{"style":62},[60,293,211],{"style":62},[56,295,169,296,298,300],{"style":58},[60,297,180],{"style":62},[60,299,271],{"style":66},[60,301,77],{"style":62},[56,303,102,304,306,308,102],{"style":80},[60,305,180],{"style":62},[60,307,237],{"style":66},[60,309,77],{"style":62},[56,311,312,314,316],{"style":58},[60,313,180],{"style":62},[60,315,85],{"style":66},[60,317,77],{"style":62},[46,319,50,321,50],{"id":48,"style":320},"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 350px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;",[46,322,50,323,50,28,50,329,50,50,342,50,50,355,50,50,371,50,50,379,50,50,398,50,50,406,50],{"id":53,"style":54},[56,324,325],{"style":58},[60,326,328],{"style":327},"background-color: #ffff00;","\u003C%@ Control Language=\"VB\" AutoEventWireup=\"false\" CodeFile=\"WaitPanel.ascx.vb\" Inherits=\"Uc_WaitPanel\" %>",[56,330,169,331,333,28,335,337,340],{"style":58},[60,332,63],{"style":62},[60,334,46],{"style":66},[60,336,88],{"style":70},[60,338,339],{"style":62},"=\"OuterTableCellOverlay\"",[60,341,77],{"style":62},[56,343,197,344,346,28,348,350,353],{"style":80},[60,345,63],{"style":62},[60,347,46],{"style":66},[60,349,88],{"style":70},[60,351,352],{"style":62},"=\"InnerTableCellOverlay\"",[60,354,77],{"style":62},[56,356,174,357,359,362,364,365,367,369],{"style":58},[60,358,63],{"style":62},[60,360,361],{"style":66},"b",[60,363,77],{"style":62},"... Please Wait ...",[60,366,180],{"style":62},[60,368,361],{"style":66},[60,370,77],{"style":62},[56,372,174,373,375,28,377],{"style":80},[60,374,63],{"style":62},[60,376,33],{"style":66},[60,378,211],{"style":62},[56,380,174,381,383,28,386,388,28,390,393,28,396,174],{"style":58},[60,382,63],{"style":62},[60,384,385],{"style":66},"asp:Image",[60,387,94],{"style":70},[60,389,97],{"style":62},[60,391,392],{"style":70},"ImageUrl",[60,394,395],{"style":62},"=\"~\u002FImages\u002Findicator_waitanim.gif\"",[60,397,211],{"style":62},[56,399,197,400,402,404],{"style":80},[60,401,180],{"style":62},[60,403,46],{"style":66},[60,405,77],{"style":62},[56,407,169,408,410,412,147],{"style":58},[60,409,180],{"style":62},[60,411,46],{"style":66},[60,413,77],{"style":62},[46,415,50,416,50],{"id":48,"style":320},[46,417,50,418,50,50,425,50,50,431,50,50,434,50,50,467,50,50,469,50,50,481,50,50,487,50,50,495,50,50,505,50,50,513,50,50,521,50,50,528,50,50,531,50,50,533,50,50,547,50,50,554,50,50,556,50,50,562,50],{"id":53,"style":54},[56,419,420,421,424],{"style":58},"Partial ",[60,422,423],{"style":62},"Class"," Uc_WaitPanel",[56,426,102,427,430],{"style":80},[60,428,429],{"style":62},"Inherits"," System.Web.UI.UserControl",[56,432,433],{"style":58}," ",[56,435,102,436,28,439,442,443,446,447,28,450,453,454,456,457,459,460,28,463,466],{"style":80},[60,437,438],{"style":62},"Protected",[60,440,441],{"style":62},"Sub"," Uc_WaitPanel_Load(",[60,444,445],{"style":62},"ByVal"," sender ",[60,448,449],{"style":62},"As",[60,451,452],{"style":62},"Object",", ",[60,455,445],{"style":62}," e ",[60,458,449],{"style":62}," System.EventArgs) ",[60,461,462],{"style":62},"Handles",[60,464,465],{"style":62},"Me",".Load",[56,468,433],{"style":58},[56,470,169,471,474,475,28,477,480],{"style":80},[60,472,473],{"style":62},"Dim"," css ",[60,476,449],{"style":62},[60,478,479],{"style":62},"New"," HtmlLink()",[56,482,169,483,486],{"style":58},[60,484,485],{"style":62},"With"," css",[56,488,489,490,494],{"style":80},"            .Href = ResolveClientUrl(",[60,491,493],{"style":492},"color: #006080;","\"~\u002FStyle\u002FWait.css\"",")",[56,496,497,498,501,502],{"style":58},"            .Attributes(",[60,499,500],{"style":492},"\"rel\"",") = ",[60,503,504],{"style":492},"\"stylesheet\"",[56,506,497,507,501,510],{"style":80},[60,508,509],{"style":492},"\"type\"",[60,511,512],{"style":492},"\"text\u002Fcss\"",[56,514,497,515,501,518],{"style":58},[60,516,517],{"style":492},"\"media\"",[60,519,520],{"style":492},"\"all\"",[56,522,169,523,28,526],{"style":80},[60,524,525],{"style":62},"End",[60,527,485],{"style":62},[56,529,530],{"style":58},"        Page.Header.Controls.Add(css)",[56,532,433],{"style":80},[56,534,169,535,537,538,28,540,543,544,494],{"style":58},[60,536,473],{"style":62}," url ",[60,539,449],{"style":62},[60,541,542],{"style":62},"String"," = ResolveClientUrl(",[60,545,546],{"style":492},"\"~\u002FScripts\u002FWait.js\"",[56,548,549,550,553],{"style":80},"        Page.ClientScript.RegisterClientScriptInclude(",[60,551,552],{"style":492},"\"wait\"",", url)",[56,555,433],{"style":58},[56,557,102,558,28,560],{"style":80},[60,559,525],{"style":62},[60,561,441],{"style":62},[56,563,564,566],{"style":58},[60,565,525],{"style":62}," Class",[46,568,50,569,50],{"id":48},[46,570,50,571,50,50,576,50,50,579,50,50,582,50,50,591,50,50,594,50,50,600,50,50,606,50,50,614,50,50,621,50,50,629,50,50,635,50,50,641,50,28,50,644,50,50,647,50,50,649,50,50,657,50,50,665,50,50,672,50,50,677,50,50,683,50,50,686,50,50,692,50,50,699,50,50,705,50,50,713,50],{"id":53,"style":54},[56,572,573],{"style":58},[60,574,575],{"style":172},"\u002F* updateprogress css *\u002F",[56,577,578],{"style":80},"    #OuterTableCellOverlay",[56,580,581],{"style":58},"    {",[56,583,169,584,587,588,147],{"style":80},[60,585,586],{"style":62},"background-color",": ",[60,589,590],{"style":492},"white;",[56,592,593],{"style":58},"        filter:alpha(opacity=85);",[56,595,596,597,169],{"style":80},"        -moz-opacity:",[60,598,599],{"style":492},"0.85;",[56,601,602,603],{"style":58},"        z-index: ",[60,604,605],{"style":492},"999;",[56,607,169,608,587,611],{"style":80},[60,609,610],{"style":62},"width",[60,612,613],{"style":492},"100%;",[56,615,169,616,587,619],{"style":58},[60,617,618],{"style":62},"height",[60,620,613],{"style":492},[56,622,169,623,587,626],{"style":80},[60,624,625],{"style":62},"position",[60,627,628],{"style":492},"absolute;",[56,630,169,631,634],{"style":58},[60,632,633],{"style":62},"top",": 0;",[56,636,169,637,640],{"style":80},[60,638,639],{"style":62},"left",": 0;                        ",[56,642,643],{"style":58},"    }",[56,645,646],{"style":58},"    #InnerTableCellOverlay",[56,648,581],{"style":80},[56,650,169,651,587,654],{"style":58},[60,652,653],{"style":62},"border",[60,655,656],{"style":492},"1px solid black;",[56,658,169,659,587,662],{"style":80},[60,660,661],{"style":62},"padding",[60,663,664],{"style":492},"10px;",[56,666,169,667,587,669],{"style":58},[60,668,586],{"style":62},[60,670,671],{"style":492},"#eee;",[56,673,602,674],{"style":80},[60,675,676],{"style":492},"998;",[56,678,169,679,587,681],{"style":58},[60,680,586],{"style":62},[60,682,671],{"style":492},[56,684,685],{"style":80},"        filter:alpha(opacity=100);",[56,687,169,688,587,690],{"style":58},[60,689,625],{"style":62},[60,691,628],{"style":492},[56,693,169,694,587,696],{"style":80},[60,695,633],{"style":62},[60,697,698],{"style":492},"0pt;",[56,700,169,701,587,703,197],{"style":58},[60,702,639],{"style":62},[60,704,698],{"style":492},[56,706,169,707,587,710,169],{"style":80},[60,708,709],{"style":62},"text-align",[60,711,712],{"style":492},"center;",[56,714,643],{"style":58},[46,716,433],{"id":48},[46,718,50,719,50],{"id":48},[46,720,50,721,50,50,748,50,50,762,50],{"id":53,"style":54},[56,722,723,725,28,728,730,28,732,734,28,736,739,28,742,745,28],{"style":58},[60,724,63],{"style":62},[60,726,727],{"style":66},"asp:Button",[60,729,110],{"style":70},[60,731,208],{"style":62},[60,733,94],{"style":70},[60,735,97],{"style":62},[60,737,738],{"style":70},"CssClass",[60,740,741],{"style":62},"=\"btn\"",[60,743,744],{"style":70},"style",[60,746,747],{"style":62},"=\"width:100px;\"",[56,749,177,750,753,28,756,759,28],{"style":80},[60,751,752],{"style":70},"OnClientClick",[60,754,755],{"style":62},"=\"return fncValidateSubmit('Ready to Submit?');\"",[60,757,758],{"style":70},"Text",[60,760,761],{"style":62},"=\"Save\"",[56,763,177,764,767,28,769,772,28,775],{"style":58},[60,765,766],{"style":70},"ToolTip",[60,768,761],{"style":62},[60,770,771],{"style":70},"Visible",[60,773,774],{"style":62},"=\"false\"",[60,776,211],{"style":62},[46,778,433],{},[46,780,433],{},[46,782,50,783,50],{"id":48},[46,784,50,786,50,50,791,50,50,797,50,50,802,50,50,812,50,50,818,50,50,823,50,50,830,50,50,836,50,28,50,839,50,50,846,50,50,849,50,50,857,50,50,860,50],{"id":53,"style":785},"text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; height: 239px; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;",[56,787,788],{"style":58},[60,789,790],{"style":172},"\u002F\u002Fvalidate before submitting signature authority            ",[56,792,102,793,796],{"style":80},[60,794,795],{"style":62},"function"," fncValidateSubmit(msg) {",[56,798,169,799],{"style":58},[60,800,801],{"style":172},"\u002F\u002Fperform some client side validation checks here...",[56,803,169,804,807,808,811],{"style":80},[60,805,806],{"style":62},"if"," (valid == ",[60,809,810],{"style":62},"true",") {",[56,813,197,814,817],{"style":58},[60,815,816],{"style":62},"var"," answer = confirm(msg);                    ",[56,819,197,820,822],{"style":80},[60,821,806],{"style":62}," (answer) {",[56,824,825,826,829],{"style":58},"                ShowWait(",[60,827,828],{"style":492},"'UpdateProgress1'",");",[56,831,174,832,835],{"style":80},[60,833,834],{"style":62},"return"," answer;",[56,837,838],{"style":58},"            }",[56,840,841,842,845],{"style":58},"        } ",[60,843,844],{"style":62},"else"," {",[56,847,848],{"style":80},"            alert(errmsg);",[56,850,197,851,28,853,856],{"style":58},[60,852,834],{"style":62},[60,854,855],{"style":62},"false",";",[56,858,859],{"style":80},"        }",[56,861,643],{"style":58},[46,863,50,864,50],{"id":48},[46,865,50,867,50,50,872,50,50,875,50,50,881,50],{"id":53,"style":866},"text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; height: 64px; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;",[56,868,869,871],{"style":58},[60,870,795],{"style":62}," ShowWait(progressControlId) {",[56,873,874],{"style":80},"    SetWaitDimensions();",[56,876,877,878,856],{"style":58},"    document.getElementById(progressControlId).style.display = ",[60,879,880],{"style":492},"'block'",[56,882,883],{"style":80},"}",[15,885,886],{},"This was an problem.",[46,888,50,890,50],{"id":48,"style":889},"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; height: 204px; max-height: 500px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;",[46,891,50,892,50,50,906,50,50,909,50,50,912,50,50,915,50,50,918,50,50,921,50,50,924,50,50,927,50,50,930,50,50,933,50,50,936,50],{"id":53,"style":54},[56,893,894,895,897,28,899,901,904],{"style":58},"\u002F\u002F\u002F\u002Fcall the following from ",[60,896,63],{"style":62},[60,898,67],{"style":66},[60,900,71],{"style":70},[60,902,903],{"style":62},"=\"load()\"",[60,905,77],{"style":62},[56,907,908],{"style":80},"\u002F\u002F\u002F\u002Frequired so that background blur is dimensioned correctly (with respect to scroll issues with browser)",[56,910,911],{"style":58},"\u002F\u002F\u002F\u002Fenable js to be called after ajax postback",[56,913,914],{"style":80},"function loadAjaxHandlers() {",[56,916,917],{"style":58},"    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);",[56,919,920],{"style":80},"    \u002F\u002Fwill process during the initialization of the postback",[56,922,923],{"style":58},"    Sys.WebForms.PageRequestManager.getInstance().add_initializeRequest(",[56,925,926],{"style":80},"                    function() {",[56,928,929],{"style":58},"                        SetWaitDimensions();",[56,931,932],{"style":80},"                    }",[56,934,935],{"style":58},"               )",[56,937,883],{"style":80},[12,939,940],{},"The following is my complete Wait.js file which you can see sizes the overlay and positions the wait message.",[46,942,50,944,50],{"id":48,"style":943},"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 500px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;",[46,945,50,946,50,50,951,50,50,955,50,50,959,50,50,964,50,50,966,50,50,971,50,50,973,50,50,978,50,50,980,50,50,982,50,50,984,50,50,986,50,50,988,50,50,992,50,50,994,50,50,998,50,50,1000,50,50,1002,50,50,1007,50,50,1012,50,50,1017,50,50,1025,50,50,1033,50,50,1035,50,50,1041,50,50,1047,50,50,1049,50,50,1054,50,50,1059,50,50,1064,50,50,1066,50,50,1071,50,50,1077,50,50,1081,50,50,1086,50,50,1092,50,50,1094,50,50,1099,50,50,1104,50,50,1106,50,50,1117,50,50,1126,50,50,1128,50,50,1130,50,50,1132,50,50,1137,50,50,1142,50,50,1147,50,50,1152,50,50,1155,50,50,1158,50,50,1166,50,50,1169,50,50,1172,50,50,1176,50,50,1179,50,50,1182,50,50,1184,50,50,1189,50,50,1191,50,50,1193,50,50,1198,50,50,1203,50,50,1208,50,50,1211,50,50,1214,50,50,1219,50,50,1221,50,50,1223,50,50,1228,50,50,1233,50,50,1238,50,50,1241,50,50,1244,50,50,1249,50],{"id":53,"style":54},[56,947,948],{"style":58},[60,949,950],{"style":172},"\u002F\u002F\u002F\u002Fcall the following from \u003Cbody onload=\"load()\">",[56,952,953],{"style":80},[60,954,908],{"style":172},[56,956,957],{"style":58},[60,958,911],{"style":172},[56,960,961,963],{"style":80},[60,962,795],{"style":62}," loadAjaxHandlers() {",[56,965,917],{"style":58},[56,967,102,968],{"style":80},[60,969,970],{"style":172},"\u002F\u002Fwill process during the initialization of the postback",[56,972,923],{"style":58},[56,974,230,975,977],{"style":80},[60,976,795],{"style":62},"() {",[56,979,929],{"style":58},[56,981,932],{"style":80},[56,983,935],{"style":58},[56,985,883],{"style":80},[56,987,433],{"style":58},[56,989,990,871],{"style":80},[60,991,795],{"style":62},[56,993,874],{"style":58},[56,995,877,996,856],{"style":80},[60,997,880],{"style":492},[56,999,883],{"style":58},[56,1001,433],{"style":80},[56,1003,1004],{"style":58},[60,1005,1006],{"style":172},"\u002F\u002Fset dimensions of blur element, positions progress box",[56,1008,1009,1011],{"style":80},[60,1010,795],{"style":62}," SetWaitDimensions() {",[56,1013,102,1014,1016],{"style":58},[60,1015,806],{"style":62}," (document.getElementById) {",[56,1018,169,1019,1021,1022,829],{"style":80},[60,1020,816],{"style":62}," blur = document.getElementById(",[60,1023,1024],{"style":492},"'OuterTableCellOverlay'",[56,1026,169,1027,1029,1030,829],{"style":58},[60,1028,816],{"style":62}," progress = document.getElementById(",[60,1031,1032],{"style":492},"'InnerTableCellOverlay'",[56,1034,433],{"style":80},[56,1036,1037,1038,856],{"style":58},"        progress.style.width = ",[60,1039,1040],{"style":492},"'444px'",[56,1042,1043,1044,856],{"style":80},"        progress.style.height = ",[60,1045,1046],{"style":492},"'100px'",[56,1048,433],{"style":58},[56,1050,169,1051,1053],{"style":80},[60,1052,816],{"style":62}," vp = getViewport();",[56,1055,169,1056,1058],{"style":58},[60,1057,816],{"style":62}," dm = getElementDimensions(document.body);",[56,1060,169,1061,1063],{"style":80},[60,1062,816],{"style":62}," sp = getScrollPosition();",[56,1065,433],{"style":58},[56,1067,169,1068,1070],{"style":80},[60,1069,806],{"style":62}," (vp.height > dm.height)",[56,1072,1073,1074,856],{"style":58},"            blur.style.height = vp.height + ",[60,1075,1076],{"style":492},"'px'",[56,1078,169,1079],{"style":80},[60,1080,844],{"style":62},[56,1082,1083,1084,856],{"style":58},"            blur.style.height = dm.height + ",[60,1085,1076],{"style":492},[56,1087,1088,1089,856],{"style":80},"        blur.style.width = ",[60,1090,1091],{"style":492},"'100%'",[56,1093,433],{"style":58},[56,1095,1096,1097,856],{"style":80},"        blur.style.top = (sp.y + ((vp.height - dm.height) \u002F 3)) + ",[60,1098,1076],{"style":492},[56,1100,1101,1102,856],{"style":58},"        blur.style.left = (sp.x + ((vp.width - dm.width) \u002F 2)) + ",[60,1103,1076],{"style":492},[56,1105,433],{"style":80},[56,1107,1108,1109,453,1111,1114,1115,856],{"style":58},"        progress.style.top = document.documentElement.clientHeight \u002F 3 - progress.style.height.replace(",[60,1110,1076],{"style":492},[60,1112,1113],{"style":492},"''",") \u002F 2 + ",[60,1116,1076],{"style":492},[56,1118,1119,1120,453,1122,1114,1124,856],{"style":80},"        progress.style.left = document.body.offsetWidth \u002F 2 - progress.style.width.replace(",[60,1121,1076],{"style":492},[60,1123,1113],{"style":492},[60,1125,1076],{"style":492},[56,1127,433],{"style":58},[56,1129,643],{"style":80},[56,1131,883],{"style":58},[56,1133,1134],{"style":80},[60,1135,1136],{"style":172},"\u002F\u002Freturns view port dimensions",[56,1138,1139,1141],{"style":58},[60,1140,795],{"style":62}," getViewport() {",[56,1143,102,1144,1146],{"style":80},[60,1145,816],{"style":62}," v = { width: 0, height: 0 };",[56,1148,102,1149,1151],{"style":58},[60,1150,806],{"style":62}," (window.innerHeight) {",[56,1153,1154],{"style":80},"        v.height = window.innerHeight;",[56,1156,1157],{"style":58},"        v.width = window.innerWidth;",[56,1159,1160,1161,28,1163,1165],{"style":80},"    } ",[60,1162,844],{"style":62},[60,1164,806],{"style":62}," (document.documentElement.clientHeight) {",[56,1167,1168],{"style":58},"        v.height = document.documentElement.clientHeight;",[56,1170,1171],{"style":80},"        v.width = document.documentElement.clientWidth;",[56,1173,1160,1174,845],{"style":58},[60,1175,844],{"style":62},[56,1177,1178],{"style":80},"        v.height = document.body.clientHeight;",[56,1180,1181],{"style":58},"        v.width = document.body.clientWidth;",[56,1183,643],{"style":80},[56,1185,102,1186,1188],{"style":58},[60,1187,834],{"style":62}," v;",[56,1190,883],{"style":80},[56,1192,433],{"style":58},[56,1194,1195],{"style":80},[60,1196,1197],{"style":172},"\u002F\u002Freturns dimensions of element",[56,1199,1200,1202],{"style":58},[60,1201,795],{"style":62}," getElementDimensions(el) {",[56,1204,102,1205,1207],{"style":80},[60,1206,816],{"style":62}," dim = { width: 0, height: 0 };",[56,1209,1210],{"style":58},"    dim.width = el.offsetWidth;",[56,1212,1213],{"style":80},"    dim.height = el.offsetHeight;",[56,1215,102,1216,1218],{"style":58},[60,1217,834],{"style":62}," dim;",[56,1220,883],{"style":80},[56,1222,433],{"style":58},[56,1224,1225],{"style":80},[60,1226,1227],{"style":172},"\u002F\u002Freturns window scroll position",[56,1229,1230,1232],{"style":58},[60,1231,795],{"style":62}," getScrollPosition() {",[56,1234,102,1235,1237],{"style":80},[60,1236,816],{"style":62}," pos = { x: 0, y: 0 };",[56,1239,1240],{"style":58},"    pos.x = window.pageXOffset ? window.pageXOffset : document.documentElement.scrollLeft;",[56,1242,1243],{"style":80},"    pos.y = window.pageYOffset ? window.pageYOffset : document.documentElement.scrollTop;",[56,1245,102,1246,1248],{"style":58},[60,1247,834],{"style":62}," pos;",[56,1250,883],{"style":80},[1252,1253],"img",{"style":1254,"src":1255,"alt":1256},"display: none;","\u002Farticles\u002Fimages\u002Fpanel.jpg","",{"title":1256,"searchDepth":1258,"depth":1258,"links":1259},2,[],"2015-04-20T08:07:16.0300000-04:00",null,"md",{},true,"\u002Farticles\u002Fasp-net-updatepanel-updateprogress-controls-and-overlays-wait-messages",{"title":6,"description":1261},"articles\u002Fasp-net-updatepanel-updateprogress-controls-and-overlays-wait-messages",[1269],"aspnet","0Cy_xmk1pTHqsntDFTdovnbYtmnSiOumdscBNMxpfJ4",[1272],{"id":1273,"title":1274,"body":1275,"description":1279,"extension":1262,"img":1280,"meta":1281,"name":1269,"navigation":1264,"path":1282,"seo":1283,"stem":1284,"__hash__":1285},"tags\u002Ftags\u002Faspnet.md","Aspnet",{"type":9,"value":1276,"toc":1277},[],{"title":1256,"searchDepth":1258,"depth":1258,"links":1278},[],"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":1279},"tags\u002Faspnet","SlUGLdZWQy8mYOWC6OetgJkwVulWNURoVHeuESIDleI",{"id":1287,"title":1288,"author":7,"body":1289,"createdAt":1571,"description":1572,"extension":1262,"img":1567,"meta":1573,"navigation":1264,"path":1574,"seo":1575,"stem":1576,"tags":1577,"updatedAt":1571,"__hash__":1579},"articles\u002Farticles\u002Fsql-coalesce-command-features.md","SQL COALESCE Command Features",{"type":9,"value":1290,"toc":1569},[1291,1294,1360,1364,1373,1407,1417,1562,1565],[12,1292,1293],{},"In order to concatenate strings (delimited by with a string) from multiple rows in a SQL Table to a single field the Coalesce command is the one to use.  Typically COALESCE is used to return a single field value which represents multiple rows concatenated by a string.",[46,1295,50,1296,50],{"id":48},[46,1297,50,1299,50,50,1310,50,50,1312,50,50,1329,50,50,1341,50,50,1347,50,50,1353,50,50,1355,50],{"id":53,"style":1298},"text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; height: 122px; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;",[56,1300,1301,1305,1306,1309],{"style":58},[60,1302,1304],{"style":1303},"color: #0000ff","DECLARE"," @EmployeeList ",[60,1307,1308],{"style":1303},"varchar","(100)",[56,1311,433],{"style":80},[56,1313,1314,1317,1318,1321,1322,453,1326,1328],{"style":58},[60,1315,1316],{"style":1303},"SELECT"," @EmployeeList = ",[60,1319,1320],{"style":1303},"COALESCE","(@EmployeeList + ",[60,1323,1325],{"style":1324},"color: #006080","', '",[60,1327,1113],{"style":1324},") + ",[56,1330,223,1331,1334,1335,28,1338,1340],{"style":80},[60,1332,1333],{"style":1303},"CAST","(Emp_UniqueID ",[60,1336,1337],{"style":1303},"AS",[60,1339,1308],{"style":1303},"(5))",[56,1342,1343,1346],{"style":58},[60,1344,1345],{"style":1303},"FROM"," SalesCallsEmployees",[56,1348,1349,1352],{"style":80},[60,1350,1351],{"style":1303},"WHERE"," SalCal_UniqueID = 1",[56,1354,433],{"style":58},[56,1356,1357,1359],{"style":80},[60,1358,1316],{"style":1303}," @EmployeeList",[1361,1362],"a",{"href":1363},"http:\u002F\u002F11011.net\u002Fsoftware\u002Fvspaste",[12,1365,1366,1367,1369,1370,1372],{},"The output from the following would be something like 1,2, 3",[33,1368],{},"\nThe following example uses a function to return a joined table field with the primary data selected.  The challenge was to return a single row from one table while returning values from the joined table into a single field.  To accomplish this I used syntax similar to the following:",[33,1371],{},"\ni.e.",[56,1374,1377,1385,1389,1390,1393,1394,1397,1399,1402,1403,1406],{"className":1375},[1376],"code",[60,1378,1380,1381],{"style":1379},"color: blue","SELECT ",[60,1382,1384],{"style":1383},"color: #000000;","personID",[60,1386,1388],{"style":1387},"color: gray",",","dbo",[60,1391,1392],{"style":1387},".","fn_CombineValues",[60,1395,1396],{"style":1387},"(",[60,1398,1384],{"style":1383},[60,1400,1401],{"style":1387},") ","Roles  \n  ",[60,1404,1405],{"style":1379},"FROM ","[People]",[12,1408,1409,1411,1413,1414,1416],{},[1361,1410],{"href":1363},[33,1412],{},"\n ",[33,1415],{},"\nThe following function was created to support the above sql query.  The function accepts the key to be used in the the joined table and returns a string value representing in this case the roles related to the primary table.",[46,1418,50,1419,50],{"id":48},[46,1420,50,1422,50,50,1431,50,50,1434,50,50,1465,50,50,1468,50,50,1477,50,50,1481,50,50,1486,50,50,1494,50,50,1496,50,50,1518,50,50,1523,50,50,1536,50,50,1543,50,50,1545,50,50,1550,50,50,1552,50,50,1557,50,50,1559,50],{"id":53,"style":1421},"text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; height: 305px; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;",[56,1423,1424,28,1427,1430],{"style":58},[60,1425,1426],{"style":1303},"CREATE",[60,1428,1429],{"style":1303},"FUNCTION"," fn_CombineValues",[56,1432,1433],{"style":80}," (",[56,1435,1436,1437,1440,1441,28,1444,28,1447,1450,1451,1454,1455,28,1458,28,1461,1464],{"style":58},"     @FK_ID ",[60,1438,1439],{"style":1303},"INT"," --The ",[60,1442,1443],{"style":1303},"foreign",[60,1445,1446],{"style":1303},"key",[60,1448,1449],{"style":1303},"from"," TableA which ",[60,1452,1453],{"style":1303},"is"," used ",[60,1456,1457],{"style":1303},"to",[60,1459,1460],{"style":1303},"fetch",[60,1462,1463],{"style":1303},"corresponding"," records",[56,1466,1467],{"style":80}," )",[56,1469,28,1470,28,1473,1476],{"style":58},[60,1471,1472],{"style":1303},"RETURNS",[60,1474,1475],{"style":1303},"VARCHAR","(8000)",[56,1478,28,1479],{"style":80},[60,1480,1337],{"style":1303},[56,1482,28,1483],{"style":58},[60,1484,1485],{"style":1303},"BEGIN",[56,1487,28,1488,1490,1491,1493],{"style":80},[60,1489,1304],{"style":1303}," @SomeColumnList ",[60,1492,1475],{"style":1303},"(8000);",[56,1495,433],{"style":58},[56,1497,28,1498,1500,1501,1503,1504,453,1506,1328,1508,1396,1510,28,1513,28,1515,1517],{"style":80},[60,1499,1316],{"style":1303}," @SomeColumnList = ",[60,1502,1320],{"style":1303},"(@SomeColumnList + ",[60,1505,1325],{"style":1324},[60,1507,1113],{"style":1324},[60,1509,1333],{"style":1303},[60,1511,1512],{"style":1303},"Role",[60,1514,1337],{"style":1303},[60,1516,1308],{"style":1303},"(20)) ",[56,1519,28,1520,1522],{"style":58},[60,1521,1345],{"style":1303}," dbo.SA_PeopleRoles C",[56,1524,28,1525,28,1528,1531,1532,1535],{"style":80},[60,1526,1527],{"style":1303},"INNER",[60,1529,1530],{"style":1303},"JOIN"," dbo.SA_Roles r ",[60,1533,1534],{"style":1303},"ON"," r.roleid=c.RoleID",[56,1537,1539,1540,1542],{"style":1538},"text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size\u003Cmce: script type=;",": 8pt; overflow: visible; border-style: none; padding: 0px;\"> ",[60,1541,1351],{"style":1303}," C.personID = @FK_ID;",[56,1544,433],{"style":80},[56,1546,28,1547,28],{"style":58},[60,1548,1549],{"style":1303},"RETURN",[56,1551,1433],{"style":80},[56,1553,28,1554,1556],{"style":58},[60,1555,1316],{"style":1303}," @SomeColumnList",[56,1558,1467],{"style":80},[56,1560,1561],{"style":58}," END",[1361,1563,1564],{"href":1564},"http:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F111341\u002Fcombine-multiple-results-in-a-subquery-into-a-single-comma-separated-value",[1252,1566],{"src":1567,"alt":1256,"style":1568},"\u002Farticles\u002Fimages\u002Fsql3.png","display:none;",{"title":1256,"searchDepth":1258,"depth":1258,"links":1570},[],"2015-04-20T08:07:16.1500000-04:00","Concatenate strings within SQL",{},"\u002Farticles\u002Fsql-coalesce-command-features",{"title":1288,"description":1572},"articles\u002Fsql-coalesce-command-features",[1578],"sql","Lvcvf-IInMfPOb1Xmt4Hkny-iQtpdEQ4KhdeRiK6CKo",{"id":1581,"title":1582,"author":7,"body":1583,"createdAt":2271,"description":1261,"extension":1262,"img":2268,"meta":2272,"navigation":1264,"path":2273,"seo":2274,"stem":2275,"tags":2276,"updatedAt":2271,"__hash__":2278},"articles\u002Farticles\u002Fgenericcollection-usage-in-the-net-framework.md","Generic(Collection) Usage in the .NET Framework",{"type":9,"value":1584,"toc":2269},[1585,1591,1594,1689,1770,1904,1907,2047,2116,2119,2122,2135,2138,2236,2244,2252,2255,2258,2261],[12,1586,1587,1588,1590],{},"Generics provide a way for developers to define subroutines, functions, fields, properties as well as classes, structures, interfaces and even delegates in such a way that the parameters are not of any particular type.  In a sense the constructs are defined in a generic approach.",[33,1589],{},"\nThe .NET Framework contains the following namespaces:System.Collections, System.Collections.Generic.    The latter mimics very much the features of the former. ",[12,1592,1593],{},"System.Collections namespace (nongeneric)",[1595,1596,50,1600,50],"table",{"border":1597,"cellSpacing":1598,"cellPadding":1598,"style":1599},0,"0","width: 515px;",[1601,1602,50,1603,50,1619,50,1629,50,1640,50,1651,50,1661,50,1671,50,1681,50],"tbody",{},[1604,1605,50,1606,50,1611,50,1615,50],"tr",{},[1607,1608,1610],"td",{"width":1609,"vAlign":633},152,"ICollection",[1607,1612,1614],{"width":1613,"vAlign":633},224,"(size, enumeration, thread safety)",[1607,1616,1618],{"width":1617,"vAlign":633},137,"derives from IEnumerable",[1604,1620,50,1621,50,1624,50,1627,50],{},[1607,1622,1623],{"width":1609,"vAlign":633},"IComparer",[1607,1625,1626],{"width":1613,"vAlign":633},"Allows two objects to be compared",[1607,1628,433],{"width":1617,"vAlign":633},[1604,1630,50,1631,50,1634,50,1637,50],{},[1607,1632,1633],{"width":1609,"vAlign":633},"IDictionary",[1607,1635,1636],{"width":1613,"vAlign":633},"Collection object to represent its contents using name\u002Fvalue pairs",[1607,1638,1639],{"width":1617,"vAlign":633},"derives from ICollection, IEnumerable",[1604,1641,50,1642,50,1645,50,1648,50],{},[1607,1643,1644],{"width":1609,"vAlign":633},"IDictionaryEnumerator",[1607,1646,1647],{"width":1613,"vAlign":633},"Enumerates the contents of a type supporting IDictionary",[1607,1649,1650],{"width":1617,"vAlign":633},"derives from IEnumerator",[1604,1652,50,1653,50,1656,50,1659,50],{},[1607,1654,1655],{"width":1609,"vAlign":633},"IEnumerable",[1607,1657,1658],{"width":1613,"vAlign":633},"Returns IEnumerator interface for a collection",[1607,1660,433],{"width":1617,"vAlign":633},[1604,1662,50,1663,50,1666,50,1669,50],{},[1607,1664,1665],{"width":1609,"vAlign":633},"IEnumerator",[1607,1667,1668],{"width":1613,"vAlign":633},"Enables for each style iteration of items in collection",[1607,1670,433],{"width":1617,"vAlign":633},[1604,1672,50,1673,50,1676,50,1679,50],{},[1607,1674,1675],{"width":1609,"vAlign":633},"IList",[1607,1677,1678],{"width":1613,"vAlign":633},"Provides add, remove and index items in a list of objects",[1607,1680,1639],{"width":1617,"vAlign":633},[1604,1682,50,1683,50,1685,50,1687,50],{},[1607,1684,433],{"width":1609,"vAlign":633},[1607,1686,433],{"width":1613,"vAlign":633},[1607,1688,433],{"width":1617,"vAlign":633},[46,1690,50,1691,50],{"id":48},[46,1692,50,1694,50,50,1704,50,50,1710,50,50,1729,50,50,1742,50,50,1754,50,50,1765,50],{"id":53,"style":1693},"padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;",[56,1695,1697,28,1700,1703],{"style":1696},"margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;",[60,1698,1699],{"style":62},"Public",[60,1701,1702],{"style":62},"Interface"," ICollection",[56,1705,147,1707,1709],{"style":1706},"margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;",[60,1708,429],{"style":62}," IEnumerable",[56,1711,147,1712,1714,1715,1717,1718,1720,1721,1723,1724,28,1726,494],{"style":1696},[60,1713,441],{"style":62}," CopyTo(",[60,1716,445],{"style":62}," array ",[60,1719,449],{"style":62}," Array, ",[60,1722,445],{"style":62}," index ",[60,1725,449],{"style":62},[60,1727,1728],{"style":62},"Integer",[56,1730,147,1731,28,1734,1737,1738,28,1740],{"style":1706},[60,1732,1733],{"style":62},"ReadOnly",[60,1735,1736],{"style":62},"Property"," Count() ",[60,1739,449],{"style":62},[60,1741,1728],{"style":62},[56,1743,147,1744,28,1746,1748,1749,28,1751],{"style":1696},[60,1745,1733],{"style":62},[60,1747,1736],{"style":62}," IsSynchronized() ",[60,1750,449],{"style":62},[60,1752,1753],{"style":62},"Boolean",[56,1755,147,1756,28,1758,1760,1761,28,1763],{"style":1706},[60,1757,1733],{"style":62},[60,1759,1736],{"style":62}," SyncRoot() ",[60,1762,449],{"style":62},[60,1764,452],{"style":62},[56,1766,1767,1769],{"style":1696},[60,1768,525],{"style":62}," Interface",[46,1771,50,1772,50],{"id":48},[46,1773,50,1774,50,50,1781,50,50,1786,50,50,1805,50,50,1810,50,50,1826,50,50,1834,50,50,1845,50,50,1856,50,50,1867,50,50,1882,50,50,1891,50,50,1900,50],{"id":53,"style":1693},[56,1775,1776,28,1778,1780],{"style":1696},[60,1777,1699],{"style":62},[60,1779,1702],{"style":62}," IDictionary",[56,1782,147,1783,1785],{"style":1706},[60,1784,429],{"style":62}," ICollection, IEnumerable",[56,1787,147,1788,1790,1791,1793,1794,28,1796,453,1798,1800,1801,28,1803,494],{"style":1696},[60,1789,441],{"style":62}," Add(",[60,1792,445],{"style":62}," key ",[60,1795,449],{"style":62},[60,1797,452],{"style":62},[60,1799,445],{"style":62}," value ",[60,1802,449],{"style":62},[60,1804,452],{"style":62},[56,1806,147,1807,1809],{"style":1706},[60,1808,441],{"style":62}," Clear()",[56,1811,147,1812,1815,1816,1793,1818,28,1820,1401,1822,28,1824],{"style":1696},[60,1813,1814],{"style":62},"Function"," Contains(",[60,1817,445],{"style":62},[60,1819,449],{"style":62},[60,1821,452],{"style":62},[60,1823,449],{"style":62},[60,1825,1753],{"style":62},[56,1827,147,1828,1830,1831,1833],{"style":1706},[60,1829,1814],{"style":62}," GetEnumerator() ",[60,1832,449],{"style":62}," IDictionaryEnumerator",[56,1835,147,1836,1838,1839,1793,1841,28,1843,494],{"style":1696},[60,1837,441],{"style":62}," Remove(",[60,1840,445],{"style":62},[60,1842,449],{"style":62},[60,1844,452],{"style":62},[56,1846,147,1847,28,1849,1851,1852,28,1854],{"style":1706},[60,1848,1733],{"style":62},[60,1850,1736],{"style":62}," IsFixedSize() ",[60,1853,449],{"style":62},[60,1855,1753],{"style":62},[56,1857,147,1858,28,1860,1862,1863,28,1865],{"style":1696},[60,1859,1733],{"style":62},[60,1861,1736],{"style":62}," IsReadOnly() ",[60,1864,449],{"style":62},[60,1866,1753],{"style":62},[56,1868,147,1869,1871,1872,1793,1874,28,1876,1401,1878,28,1880],{"style":1706},[60,1870,1736],{"style":62}," Item(",[60,1873,445],{"style":62},[60,1875,449],{"style":62},[60,1877,452],{"style":62},[60,1879,449],{"style":62},[60,1881,452],{"style":62},[56,1883,147,1884,28,1886,1888,1889,1703],{"style":1696},[60,1885,1733],{"style":62},[60,1887,1736],{"style":62}," Keys() ",[60,1890,449],{"style":62},[56,1892,147,1893,28,1895,1897,1898,1703],{"style":1706},[60,1894,1733],{"style":62},[60,1896,1736],{"style":62}," Values() ",[60,1899,449],{"style":62},[56,1901,1902,1769],{"style":1696},[60,1903,525],{"style":62},[12,1905,1906],{},"IList provides the ability to insert, remove and index items",[46,1908,50,1909,50],{"id":48},[46,1910,50,1911,50,50,1918,50,50,1922,50,50,1936,50,50,1940,50,50,1954,50,50,1969,50,50,1986,50,50,1996,50,50,2007,50,50,2017,50,50,2027,50,50,2041,50],{"id":53,"style":1693},[56,1912,1913,28,1915,1917],{"style":1696},[60,1914,1699],{"style":62},[60,1916,1702],{"style":62}," IList",[56,1919,147,1920,1785],{"style":1706},[60,1921,429],{"style":62},[56,1923,147,1924,1790,1926,1800,1928,28,1930,1401,1932,28,1934],{"style":1696},[60,1925,1814],{"style":62},[60,1927,445],{"style":62},[60,1929,449],{"style":62},[60,1931,452],{"style":62},[60,1933,449],{"style":62},[60,1935,1728],{"style":62},[56,1937,147,1938,1809],{"style":1706},[60,1939,441],{"style":62},[56,1941,147,1942,1815,1944,1800,1946,28,1948,1401,1950,28,1952],{"style":1696},[60,1943,1814],{"style":62},[60,1945,445],{"style":62},[60,1947,449],{"style":62},[60,1949,452],{"style":62},[60,1951,449],{"style":62},[60,1953,1753],{"style":62},[56,1955,147,1956,1958,1959,1800,1961,28,1963,1401,1965,28,1967],{"style":1706},[60,1957,1814],{"style":62}," IndexOf(",[60,1960,445],{"style":62},[60,1962,449],{"style":62},[60,1964,452],{"style":62},[60,1966,449],{"style":62},[60,1968,1728],{"style":62},[56,1970,147,1971,1973,1974,1723,1976,28,1978,453,1980,1800,1982,28,1984,494],{"style":1696},[60,1972,441],{"style":62}," Insert(",[60,1975,445],{"style":62},[60,1977,449],{"style":62},[60,1979,1728],{"style":62},[60,1981,445],{"style":62},[60,1983,449],{"style":62},[60,1985,452],{"style":62},[56,1987,147,1988,1838,1990,1800,1992,28,1994,494],{"style":1706},[60,1989,441],{"style":62},[60,1991,445],{"style":62},[60,1993,449],{"style":62},[60,1995,452],{"style":62},[56,1997,147,1998,2000,2001,1723,2003,28,2005,494],{"style":1696},[60,1999,441],{"style":62}," RemoveAt(",[60,2002,445],{"style":62},[60,2004,449],{"style":62},[60,2006,1728],{"style":62},[56,2008,147,2009,28,2011,1851,2013,28,2015],{"style":1706},[60,2010,1733],{"style":62},[60,2012,1736],{"style":62},[60,2014,449],{"style":62},[60,2016,1753],{"style":62},[56,2018,147,2019,28,2021,1862,2023,28,2025],{"style":1696},[60,2020,1733],{"style":62},[60,2022,1736],{"style":62},[60,2024,449],{"style":62},[60,2026,1753],{"style":62},[56,2028,147,2029,1871,2031,1723,2033,28,2035,1401,2037,28,2039],{"style":1706},[60,2030,1736],{"style":62},[60,2032,445],{"style":62},[60,2034,449],{"style":62},[60,2036,1728],{"style":62},[60,2038,449],{"style":62},[60,2040,452],{"style":62},[56,2042,2043,28,2045],{"style":1696},[60,2044,525],{"style":62},[60,2046,1702],{"style":62},[1595,2048,50,2050,50],{"border":1597,"cellSpacing":1598,"cellPadding":1598,"style":2049},"width: 711px;",[1601,2051,50,2052,50,2066,50,2077,50,2088,50,2098,50,2108,50],{},[1604,2053,50,2054,50,2058,50,2062,50],{},[1607,2055,2057],{"width":2056,"vAlign":633},133,"ArrayList",[1607,2059,2061],{"width":2060,"vAlign":633},414,"dynamically sized \nDim personList as New ArrayList() \npersonList.AddRange(New Person(){New Person(“dave”), New Person(“tom”)}",[1607,2063,2065],{"width":2064,"vAlign":633},162,"IList \nICollection \nIEnumerable \nICloneable",[1604,2067,50,2068,50,2071,50,2074,50],{},[1607,2069,2070],{"width":2056,"vAlign":633},"Hashtable",[1607,2072,2073],{"width":2060,"vAlign":633},"collection whereby each item is represented by a numerical key",[1607,2075,2076],{"width":2064,"vAlign":633},"IDictionary \nICollection \nIEnumerable \nICloneable",[1604,2078,50,2079,50,2082,50,2085,50],{},[1607,2080,2081],{"width":2056,"vAlign":633},"Queue",[1607,2083,2084],{"width":2060,"vAlign":633},"first in – first out queue with members Dequeue() (removes object at the top of queue), Enqueue() (adds object to end of queue), Peek() (returns object at the beginning of queue without removing it)",[1607,2086,2087],{"width":2064,"vAlign":633},"ICollection \nICloneable \nIEnumerable",[1604,2089,50,2090,50,2093,50,2096,50],{},[1607,2091,2092],{"width":2056,"vAlign":633},"SortedList",[1607,2094,2095],{"width":2060,"vAlign":633},"similar to dictionary however items can be accessed by ordinal position",[1607,2097,2076],{"width":2064,"vAlign":633},[1604,2099,50,2100,50,2103,50,2106,50],{},[1607,2101,2102],{"width":2056,"vAlign":633},"Stack",[1607,2104,2105],{"width":2060,"vAlign":633},"last in – first out queue using push, pop and peek",[1607,2107,2087],{"width":2064,"vAlign":633},[1604,2109,50,2110,50,2112,50,2114,50],{},[1607,2111,433],{"width":2056,"vAlign":633},[1607,2113,433],{"width":2060,"vAlign":633},[1607,2115,433],{"width":2064,"vAlign":633},[15,2117,2118],{},"System.Collections.Generic",[12,2120,2121],{},"Boxing\u002FUnboxing is a term that is used when a value type variable is stored in a reference type structure.  This occurs with all nongeneric types as they operate of the System.Objects type.",[12,2123,2124,2125,2127,2128,2130,2131,2134],{},"For example:\nDim ar as New ArrayList()\nar.Add(123) ‘boxing occurs\nDim i as Integer = CType(ar(0), Integer) ‘unboxing occurs",[33,2126],{},"\n\u003Cp$1$2$3$4$5$6> ",[33,2129],{},"\nUsing a generic collection:\n",[15,2132,2133],{},"Dim ar as New List(Of Integer)","\nar.Add(10) ‘no boxing\nDim i as Integer = ar(0) ‘no unboxing",[12,2136,2137],{},"The following is a list of interfaces within the System.Collections.Generic namespace: ICollections(Of T), IComparer(Of T), IDictionary(Of K, V), IEnumerable(Of T), IEnumerator(Of T), and IList(Of T).  There respective classes are as follows:",[1595,2139,50,2141,50],{"border":1597,"cellSpacing":1598,"cellPadding":1598,"style":2140},"width: 657px;",[1601,2142,50,2143,50,2156,50,2166,50,2176,50,2186,50,2196,50,2206,50,2216,50,2226,50],{},[1604,2144,50,2145,50,2149,50,2153,50],{},[1607,2146,2148],{"width":2147,"vAlign":633},198,"Collection(Of T)",[1607,2150,2152],{"width":2151,"vAlign":633},274,"generic collection",[1607,2154,433],{"width":2155,"vAlign":633},183,[1604,2157,50,2158,50,2161,50,2164,50],{},[1607,2159,2160],{"width":2147,"vAlign":633},"Comparer(Of T)",[1607,2162,2163],{"width":2151,"vAlign":633},"compares two generic objects",[1607,2165,433],{"width":2155,"vAlign":633},[1604,2167,50,2168,50,2171,50,2174,50],{},[1607,2169,2170],{"width":2147,"vAlign":633},"Dictionary(Of K, V)",[1607,2172,2173],{"width":2151,"vAlign":633},"name\u002Fvalue pairs",[1607,2175,433],{"width":2155,"vAlign":633},[1604,2177,50,2178,50,2181,50,2184,50],{},[1607,2179,2180],{"width":2147,"vAlign":633},"List(Of T)",[1607,2182,2183],{"width":2151,"vAlign":633},"dynamically resizable",[1607,2185,433],{"width":2155,"vAlign":633},[1604,2187,50,2188,50,2191,50,2194,50],{},[1607,2189,2190],{"width":2147,"vAlign":633},"Queue(Of T)",[1607,2192,2193],{"width":2151,"vAlign":633},"FIFO collection",[1607,2195,433],{"width":2155,"vAlign":633},[1604,2197,50,2198,50,2201,50,2204,50],{},[1607,2199,2200],{"width":2147,"vAlign":633},"SortedDictionary(Of K, V)",[1607,2202,2203],{"width":2151,"vAlign":633},"sorted set of name\u002Fvalue pairs",[1607,2205,433],{"width":2155,"vAlign":633},[1604,2207,50,2208,50,2211,50,2214,50],{},[1607,2209,2210],{"width":2147,"vAlign":633},"Stack(Of T)",[1607,2212,2213],{"width":2151,"vAlign":633},"LIFO collection",[1607,2215,433],{"width":2155,"vAlign":633},[1604,2217,50,2218,50,2221,50,2224,50],{},[1607,2219,2220],{"width":2147,"vAlign":633},"LinkedList(Of T)",[1607,2222,2223],{"width":2151,"vAlign":633},"doubly linked list",[1607,2225,433],{"width":2155,"vAlign":633},[1604,2227,50,2228,50,2231,50,2234,50],{},[1607,2229,2230],{"width":2147,"vAlign":633},"ReadOnlyCollection(Of T)",[1607,2232,2233],{"width":2151,"vAlign":633},"readonly set of items",[1607,2235,433],{"width":2155,"vAlign":633},[12,2237,2238,2239,2127,2241,2243],{},"Public Function Test(Of T)(ByRef o1 as T, ByRef o2 as T) as T\n  ‘do something\nEnd Function",[33,2240],{},[33,2242],{},"\nIt is possible to establish constraints with respect to the type of T.  The following is a complete list of the types of constraints:\nOf T as Structure > the type parameter must be a value type (ie. structure)\nOf T as Class > the type parameter must be a reference type (i.e. classes)\nOf T as New > the type parameter must have a default constructor\nOf T as NameOf BaseClass > the type parameter must be derived from the class specified by NameOfBaseClass\nOf T as NameOfInterface > the type parameter must implement the interface specified by NameOfInterface",[12,2245,2246,2247,2127,2249,2251],{},"’new items must have a default constructor\nPublic Class TestClass(Of T as New)\n  ‘stuff here\nEnd Class",[33,2248],{},[33,2250],{},"\nThe term generic can apply to Interfaces as well. In any case the interface will define the contract that the implementing class must adhere to.  When implementing a generic interface the supporting type specifies the placeholder type:",[12,2253,2254],{},"Public Interface IMyInterface(Of T)\n  Function Add(ByVal x as T, ByVal y as T) as T\nEnd Interface",[12,2256,2257],{},"Public Class MyClass\n  Implements IMyInterface(Of Integer)",[12,2259,2260],{},"Public Function Add(ByVal x as Integer, ByVal y as Integer) as Integer\n  Return x + y\nEnd Function",[12,2262,2263,2264,2266],{},"By all means utilize the generic collection namespace over the system.collection nongeneric namespace.  In addition to improved performance(avoiding boxing\u002Funboxing) your code will avoid type-safety issues of earlier releases of .NET.",[33,2265],{},[1252,2267],{"style":1254,"src":2268,"alt":1256},"\u002Farticles\u002Fimages\u002Ffeet.jpg",{"title":1256,"searchDepth":1258,"depth":1258,"links":2270},[],"2015-04-20T08:07:15.7900000-04:00",{},"\u002Farticles\u002Fgenericcollection-usage-in-the-net-framework",{"title":1582,"description":1261},"articles\u002Fgenericcollection-usage-in-the-net-framework",[2277],"netcore","HVNZe5xrJpyaU0pq3szPwlINvtqAJ9ix-JzG7RGvBtg",1781574762184]