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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Action in ASPX Pages?????

Status
Not open for further replies.

FRANDAZZO

Programmer
Nov 29, 2000
60
0
0
US
Hello all -

I am just getting started on working with ASPX pages. I have a form tag that the runat="server". For some reason my form action is not posting to the correct page but actually to the same page. Meaning, My current page is page1.aspx and the form action is to page2.aspx. When I submit the page it does not go to page2.aspx.

Why is this happening???

What I have currently done to solve this issue is that in the click event of the button I redirect to page2.aspx. That is fine for now but what about if I have a lot of controls on the form. I am gonna have to build a really long string/url to direct 2. That would really suck!!!!

Please say there is a way!

Thanks in advance,
Frandazzo
NYC.
 
.net doesn't really want you do post to a new page... i use the Page.IsPostBack in my page_load sub to tell what its done... and just hide/show data with panel controls... it allows for you to not need multiple pages... if you do want to use multiple pages, you have to redirect or use server.transfer (
I usually just postback to the same page... it makes simple things like search forms neat and easily organized... and they don't get too long since you can keep code in a separate file.

hope this helps...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top