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

Form Validation and Querystring Rendering Methods

Status
Not open for further replies.

oldwen

Programmer
Dec 2, 2003
23
US
Hello fellow professionals. I have a problem with form validations and my web development method. I am using VS.NET 2003 and 1.1 Framework. My website is filtered entirely through my default.aspx page and content is rendered based upon the querystring provided. Example... <HTML>
<Body>
<% Dim page(10) as String
Page(1) = "main/thispage.aspx"
Server.Execute(Page(Request.Querystring("string"))
%>
This method is working fine for me except when I get to form validation. On one of my content pages I have a form. I have enabled viewstate and have validation controls in place. When I click submit on the page, it post back to itself and fires all validation controls that were invalid. The problem is that now on the post back, it no longer is the default.aspx?string=1 page, it is now just the thispage.aspx page, so ofcourse I am missing my content from the default.aspx page like my menu items and navigations, headers, etc. Any ideas on how to resolve this issue. Any help is apprciated.

Oldwen
 
Could you use Server.Transfer isnsetad as there is an option (preserveForm) that, if true, the QueryString and Form collections are preserved. If false, they are cleared. The default is false. e.g.
Code:
Server.Transfer("MyPage.aspx?MyQueryString=1", True)


----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Looked like a great idea, but the server.transfer method did not work. The page still post back to itself.
 
The page will postback to itself - it is when it is posted back to itself you can transfer to another page with the querystring and form details.

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top