Answer: If we are working with Updatepanel in ASP.Net,then we must use UpdateMode property.
If the UpdateMode property is set to Always,the UpdatePanel control’s content will get refreshed on every postback meaning that if we set UpdateMode to Always then if any events viz. button click,dropdownlist selectedindexchanged event occurs then the content of an updatepanel control is refreshed.Therefore it causes the page performance,because page is refreshing everytime.Therefore we have to avoid page refresh,thatswhy we have to set updatemode property to Conditional.
Syntax:-
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always"></asp:UpdatePanel>
Asked In: Many Interviews |
Alert Moderator