B
Brian Conway
Anyone know if it is possible to have a button inside a datagird that will
launch a new window? I have a button on my webform that does this currently
and it works fine. I took that code and put a button into the datagrid
template and wanted it to do the same thing per line and pass that line
information into the window it launches, however, it is not working. so far
the only code I have on the button is below and it doesn't work.
private void DataGrid1_SelectedIndexChanged(object sender, System.EventArgs
e)
{
string sUrl = "ChangeForm.aspx";
string sFeatures = "'height=320;width=160;left=100;top=50;'";
string sScript;
sScript = "<script language=javascript>" +
"window.open('" + sUrl + "',''," + sFeatures + ");"+
"</script>";
// Write it into the output stream for immediate execution
Response.Write(sScript);
}
launch a new window? I have a button on my webform that does this currently
and it works fine. I took that code and put a button into the datagrid
template and wanted it to do the same thing per line and pass that line
information into the window it launches, however, it is not working. so far
the only code I have on the button is below and it doesn't work.
private void DataGrid1_SelectedIndexChanged(object sender, System.EventArgs
e)
{
string sUrl = "ChangeForm.aspx";
string sFeatures = "'height=320;width=160;left=100;top=50;'";
string sScript;
sScript = "<script language=javascript>" +
"window.open('" + sUrl + "',''," + sFeatures + ");"+
"</script>";
// Write it into the output stream for immediate execution
Response.Write(sScript);
}