1)In which control you want to focus set this as behaviour id of modalpopup
2)use this code block
In following example we set the focus on emergency code text box.
if ((!Page.ClientScript.IsStartupScriptRegistered("Startup"))) {
StringBuilder sb = new StringBuilder();
sb.Append("");
Page.ClientScript.RegisterStartupScript(Page.GetType(), "Startup", sb.ToString());
Thanks
Mahesh K. Sharma
Friday, December 17, 2010
How to add buttons for fullpost back in gridview while using update panels
1)
Add following code on row_databound
ImageButton ImageButtonDocumentDownLoad = (ImageButton)e.Row.FindControl("ImageButtonDocumentDownLoad");
ScriptManager scriptManager = ScriptManager.GetCurrent(this);
scriptManager.RegisterPostBackControl(ImageButtonDocumentDownLoad);
//If grid view in user control
2)
ScriptManager scriptManager = new ScriptManager();
scriptManager.RegisterPostBackControl(ImageButtonDocumentDownLoad);
Thanks
Mahesh K. Sharma
Add following code on row_databound
ImageButton ImageButtonDocumentDownLoad = (ImageButton)e.Row.FindControl("ImageButtonDocumentDownLoad");
ScriptManager scriptManager = ScriptManager.GetCurrent(this);
scriptManager.RegisterPostBackControl(ImageButtonDocumentDownLoad);
//If grid view in user control
2)
ScriptManager scriptManager = new ScriptManager();
scriptManager.RegisterPostBackControl(ImageButtonDocumentDownLoad);
Thanks
Mahesh K. Sharma
Subscribe to:
Posts (Atom)