I want to open new tab window by click grid row command,so normally its working but when i put grid into update panel then its not redirecting to new tab, where as when i de bugged code behind side working properly.so how to open new tab by click on row command of gridview in update control?
BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px"
CellPadding="3" CellSpacing="1" GridLines="None"
onrowcommand="gridPaySearch_RowCommand"
onselectedindexchanging="gridPaySearch_SelectedIndexChanging">
<%#Container.DataItemIndex + 1%>
onselectedindexchanged="ddlRecordPayment_SelectedIndexChanged">
/* code beind side*/
protected void gridPaySearch_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "PaymentVIEW")
{
int row = Convert.ToInt32(e.CommandArgument);
Session["PayId"] = row;
Response.Write("");
//Response.Write("");
//Response.Redirect("~/Update Pages/PaymentUpdateAndDelete.aspx");
}
else if (e.CommandName == "CustomerVIEW")
{
int row = Convert.ToInt32(e.CommandArgument);
Session["UserId"] = row;
Response.Redirect("~/Update Pages/RegCustUpdateAndDelete.aspx");
}
}
2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Keertti Raj Thangavelu BabuPosted Mar 24, 2015, 5:14 AM
use this code instead of response.redirect.
ScriptManager.RegisterStartupScript(Page, typeof(Page), "OpenWindow", "window.open('enter your url');", true);
Note : While executing , Please ensure browser allows the popup window or new tab.
Azaad AbbasPosted Mar 24, 2015, 6:14 AM