English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i am new to asp.net. i have created a project with a simple web form as a home page. on this page, there are buttons to take the user to another page. this second page is another web form. the problem im having is that upon selecting a button, the next page does not open and reloads the current page. any help would be greatly appreciated!

2007-02-06 09:25:54 · 4 answers · asked by marcusbrowley 1 in Computers & Internet Programming & Design

4 answers

Upon submitting the form, make sure you're using the command Response.Redirect(" secondpagename.asp ") where what's in the quotes the page name. You'd probably need to post more info to get a more detailed answer.

2007-02-06 09:31:58 · answer #1 · answered by Kam311 1 · 0 0

If it's asp.net 1.1 then standard web forms can only postback to themselves. To postback to another page you will need to look at redirecting to that page on the buttons click. The page you redirect to can then use the form or querystring collection to access the original page's form element values.

You could of course simple use a link to navigate to the new page so long as no values from the originating page need to move to the new page.

Feel free to email with your specific scenario and some sample code, I'll be happy to code up a working model with some explanation of what's going on.

Otherwise try buying the Professional AS.NET: Beginner to Expert book from Apress (Matthew Macdonald). Evverything you need to know about how asp.net works and how to code it is here and it's super easy to foollow.
http://www.apress.com/book/bookDisplay.html?bID=450

2007-02-06 10:29:59 · answer #2 · answered by Klausy 2 · 0 0

By default, asp.net pages submit to themselves. What you need to do is create an "on_click" event for the button that will process the form and then redirect to another page.

2007-02-07 07:01:12 · answer #3 · answered by Mark B 5 · 0 0

Try the site below - loads more IT experts than on here.

And no, I'm not on commission, just another IT chap... ;-)

2007-02-06 09:30:20 · answer #4 · answered by Anonymous · 0 0

fedest.com, questions and answers