HI Jeremy,
As I said the window is a client side concept and is only from the client
side that you can create them, now in your escenario its possible to
generate the client code from the code behind, like this:
in the aspx file:
<Script>
var openwindow="no";
var windowURL = "";
function CheckIFNeededOpenWindow()
{
if ( openwindow == "yes" )
window.open( windowURL, .... )
}
</script>
<body onLoad = CheckIFNeededOpenWindow(); >
now in the .cs code :
void button_onclick(sender o , eventargs e)
{
//do the validation, if error open the new window
if ( error )
{
Literal lit = new Literal();
lit.Text= "<script> openwindow=\"yes\"; windowURL=\"" + URL_TO_OPEN +
"\";</script>" ;
Controls.Add( lit);
}
}
With the above code you can solve your problem, if you have any other doubt
just post back,
Cheers,