D
Douglas Gierow
a long time ago, someone asked the question:
"I'm using a link button for a Select Button Column in a datagrid.
Based on information within the grid I'm doing a response.redirect to
a different page. However, I'd like to open a new window. How is
this done?"
i had the same problem so here's my fix:
add a hidden input variable to the html form. set value="0" and
runat="server". then in the SelectedIndexChanged event of the
datagrid, set the value="1". add a javascript function to the page
that looks like this:
function openNewWindow() {
if (document.all.openNewWindowFlag.value == 1) {
window.open('mypage.aspx','_blank',width=980,height=650');
}
}
call this function from the onload event on the body tag:
<body onload="javascript: openNewWindow();">
and that's it. there is probably a better way to do this, so if
anyone has another solution, post it.
"I'm using a link button for a Select Button Column in a datagrid.
Based on information within the grid I'm doing a response.redirect to
a different page. However, I'd like to open a new window. How is
this done?"
i had the same problem so here's my fix:
add a hidden input variable to the html form. set value="0" and
runat="server". then in the SelectedIndexChanged event of the
datagrid, set the value="1". add a javascript function to the page
that looks like this:
function openNewWindow() {
if (document.all.openNewWindowFlag.value == 1) {
window.open('mypage.aspx','_blank',width=980,height=650');
}
}
call this function from the onload event on the body tag:
<body onload="javascript: openNewWindow();">
and that's it. there is probably a better way to do this, so if
anyone has another solution, post it.