Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exit button - another newbie question

Status
Not open for further replies.

tmryan

Programmer
Dec 22, 2000
73
US
Been a programmer for 10 years - but just getting my feet wet with ASP.Net and C#.

I have a web form that I want to close on the submit of an Exit button. Should that be handled from the aspx or the aspc.cs? Seemingly a simple task - but I can't figure out how to do it. I'm kind of guesing on the dispose() method - but haven't figured it out yet.

Any point in the right direction will be appreciated.
And yes - I am rtfm's. I'm coming up to speed.
Thanks
Tim

Tim Ryan
PROGRESS Developer
 
You might want to do something like this in the aspx page.

<input type=&quot;button&quot; onclick=&quot;JavaScript:parent.window.close()&quot;>

This might tell the user that the page is trying to be closed though.

Erica
 
ecannizzo's right.

You (unfortunately) can't close a webform from code-behind. You still do have to resort to client-side scripting to acheive that functionality.

-----------------------------------------------
&quot;The night sky over the planet Krikkit is the least interesting sight in the entire universe.&quot;
-Hitch Hiker's Guide To The Galaxy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top