943,917 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Marked Solved
  • Views: 641
  • ASP.NET RSS
Jan 9th, 2009
0

Open Page2 from Page1 in Web Developer

Expand Post »
I am using "Microsoft Visual Web Developer 2008 Express Edition".

I have created a First page with a button and 2 textBoxes( see attached file)

In my project I have added a new item/Page 2 to this project.

What I now is trying to do or wonder how it is possible, is how to open this Page2 when pressing this button.

Normally when you do this in C# you would have done something like this to open a new Form. Is the solution something simular to this ?
ASP.NET Syntax (Toggle Plain Text)
  1. Form2 form2 = new Form2();
  2. form2.Show();
Attached Thumbnails
Click image for larger version

Name:	Page1.JPG
Views:	18
Size:	38.4 KB
ID:	8803  
Last edited by Liszt; Jan 9th, 2009 at 5:06 pm.
Reputation Points: 33
Solved Threads: 6
Junior Poster
Liszt is offline Offline
122 posts
since Oct 2008
Jan 9th, 2009
0

Re: Open Page2 from Page1 in Web Developer

Click to Expand / Collapse  Quote originally posted by Liszt ...
Normally when you do this in C# you would have done something like this to open a new Form. Is the solution something simular to this ?
ASP.NET Syntax (Toggle Plain Text)
  1. Form2 form2 = new Form2();
  2. form2.Show();
Im just curious as to when you would do this on a web page ?

What your looking to do is

ASP.NET Syntax (Toggle Plain Text)
  1. Response.Redirect = "http://www.google.com/";

having not used visual web developer i am unsure how you would go about it, but you would not want to post back to achieve this when it can be done in standard HTML unless you needed to perform some validation.

If these are ASP controls which i assume they are, a property is available to you which you can set on each of the buttons along the lines of 'PostBackURL'
Reputation Points: 66
Solved Threads: 56
Posting Pro in Training
Fungus1487 is offline Offline
459 posts
since Apr 2007
Jan 9th, 2009
0

Re: Open Page2 from Page1 in Web Developer

Yes that was the way I wanted to do.
It did work fine using the property: 'PostBackURL' for the button
and put the address there.
Thank You!
Reputation Points: 33
Solved Threads: 6
Junior Poster
Liszt is offline Offline
122 posts
since Oct 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Loop Madness!
Next Thread in ASP.NET Forum Timeline: BeginnerQuestions to create WebSite





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC