hi ,
on one of my aspx page i have updatepanel, inside update panel i have grid view , which has a linkbotton , when user clicks on any of the link botton, i need to open a new aspx page in new window, i am using master page
i tried following code but no luck, any suggestions ?
protected void DBGrid_SelectedIndexChanged(object sender, EventArgs e)
{
string key = DBGrid.SelectedDataKey.Value.ToString();
if (!string.IsNullOrEmpty(key))
{
//string newWindowUrl = "Test2.aspx";
//string javaScript = "window.open('" + newWindowUrl + "');";
//ScriptManager.RegisterStartupScript(Page, Page.GetType(), "MyScript", javaScript, true);
string newWindowUrl = "~/Test3.aspx";
ClientScript.RegisterStartupScript(this.GetType(), "key", "<script>window.open('" + newWindowUrl + "');</script>");
}
}
Go to the complete details ...