Update panel best approach
1.add script manager in masterpage ,inside form tag.
<asp:ScriptManager ID=”scriptManager” runat=”server” />
2.Add update panel in page as below
<asp:UpdatePanel runat=”server” ID=”updcontents” UpdateMode=”Conditional”>
<ContentTemplate>
</ContentTemplate>
</asp:UpdatePanel>
3. Use this script to call javascript function in backend
ScriptManager.RegisterClientScriptBlock(updEml, updEml.GetType(), “scri”, “sensexniftychart(‘BSE’,’1′);”, true);
4. Update Updatepanel in Masrterpage Usercontrol
string Upperstring = Request.Path.ToString().ToUpper();
if (Upperstring.IndexOf(“INVESTEQUITY.ASPX”) > 0 || Upperstring.IndexOf(“EQUITYCALLS.ASPX”) > 0)
{
ContentPlaceHolder placeholder = Page.Master.FindControl(“ContentPlaceHolder1”) as ContentPlaceHolder;
UpdatePanel updatePanel = placeholder.FindControl(“updcontents”) as UpdatePanel;
updatePanel.Update();
}