Hello,
I' m facing the problem that is window.open() javascript funtion for open new tab doen't work in Radgrid item command event.Here is my Code for Item Command.
protected void RadGrid2_ItemCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == "Customer")
{
lblID.Text = RadGrid2.Items[e.Item.ItemIndex].GetDataKeyValue("ID").ToString();
string strpath= "../Report/Listing.aspx?ID=" + lblID.Text + "";
Response.Write("<script>");
Response.Write("window.open('" + strpath + "', '_newtab');");
Response.Write("window.focus();");
Response.Write("</script>");
}
}
I do appreciate all suggestions.
I' m facing the problem that is window.open() javascript funtion for open new tab doen't work in Radgrid item command event.Here is my Code for Item Command.
protected void RadGrid2_ItemCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == "Customer")
{
lblID.Text = RadGrid2.Items[e.Item.ItemIndex].GetDataKeyValue("ID").ToString();
string strpath= "../Report/Listing.aspx?ID=" + lblID.Text + "";
Response.Write("<script>");
Response.Write("window.open('" + strpath + "', '_newtab');");
Response.Write("window.focus();");
Response.Write("</script>");
}
}
I do appreciate all suggestions.