I want to move between forms in c#, but I want to close the form that linked me.
If I have two forms , form1 and form2 I want to move from form1 to form2 and form1 to be closed.
how to do it?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amr NoureldinPosted Aug 14, 2005, 4:24 AM
And when the user clicks on a button [i]continue[/i], you want the page [b]login.aspx[/b] to open, so make an event on the button, and inside the event use this:
Response.Redirect("login.aspx");
Does that answer your question?
sbugigPosted Aug 11, 2005, 3:01 AM
Crew ReynoldsPosted Aug 10, 2005, 11:23 AM
I'm new at C# so I thought I'd give this a shot. Not as easy as I figured. I created Form1 that then
creates Form2. When I tried to let Form1 unload itself, the app closes. I never could find a way to
have Form2 tell Form1 to close itself. However, if I could, I bet it would close the app as Form1 is
the root (parent) form. Maybe you could use one form and show/hide panels of components in a
"Wizard" next/previous sort of thing. Is that what you're after?
Sorry I don't have a good answer. I'm just getting going and everything is new to me again coming from VB6.