Hi!
You can use javascript from within your code like below!
Response.Write("<script language='javascript'>window.opener =
self</script>")
Response.Write("<script language='javascript'>window.close()</script>")
Explaination why 2 lines:
You will be prompt with a message box to confirm the closing of the
window if you are trying to close a window via javascript which hasn't
been opend by a javascript! (like you dow with your winform2.aspx)
To avoid that we set the opener to itself (which is the first line of
code) and there you go - the window is closing.
You can put that WHEREEVER in your code - so after you call the
javascript to open winform2.aspx - cut the window.close() out of that
line - you ad the new two lines as shown below
#VB
Response.Write("<script
language='javascript'>window.open('WebForm1.aspx', 'two','menubar=no')</s
cript>")
Response.Write("<script language='javascript'>window.opener =
self</script>")
Response.Write("<script language='javascript'>window.close()</script>")
TADA
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!