popup C# stuckage :(

Don
Joined
5 Oct 2005
Posts
11,240
Location
Liverpool
Why do you all think this aint working??
protected void CompList_RowCommand(object sender, GridViewCommandEventArgs e)
{

if (e.CommandName == "Info")
{
int No = Convert.ToInt32(CompList.FindControl("PC_ID"));

string sNewPageUrl = string.Format("compdetails.aspx?pcid=" + No.ToString());
string sScript = string.Format("<script language='javascript'>window.open('{0}');</script>", sNewPageUrl);
Page.RegisterStartupScript("Launch_Report_Window", sScript);
}
}

Stelly
 
Ok I have tried this as well...

protected void CompList_RowCreated(object sender, GridViewRowEventArgs e)
{

if (e.Row.RowType == DataControlRowType.DataRow)
{
string No = Convert.ToString(CompList.FindControl("PC_ID"));

string sNewPageUrl = string.Format("compdetails.aspx?pcid=" + No);
string sScript = string.Format("<script language='javascript'>window.open('{0}');</script>", sNewPageUrl);
Page.RegisterStartupScript("Launch_Report_Window", sScript);
}
}
 
Back
Top Bottom