• 0

form and results in 1 page (ASP) ?


Question

I currently have 2 pages which do the following.

1st page is a basic form where the users enters a ticket/call number, and clicks submit.

the form then passes the submitted data to the second ASP page to display the results from a MySQL database.

is it possible to combine the 2 pages so that everything is done in 1 page? ie form is displayed initially and then the results are displayed once submitted?

the form is a basic POST style form "<form method="POST" name="name" action="action.asp">"

files.zip

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

If you are using ASP.net you can use 'Panels' and toggle the visibility.

However it's not really the best design idea to have these things in one page.

Edit: You can store a session variable to inform if the form has been completed during current session using an if statement to determine if you should be showing form or data.

Link to comment
Share on other sites

  • 0

If you are using ASP.net you can use 'Panels' and toggle the visibility.

no i'm not using ASP.net

However it's not really the best design idea to have these things in one page.

really? from what i've read, it very much is the preferred way to do it.

Link to comment
Share on other sites

  • 0

I agree with other posters that you shouldn't do it. My experience shows that keeping the pages as simple as possible helps to dubug issues and update pages more easily down the road.

But to do it you just need to wrap large parts of the page in an if statement and check for a variable to see if it has been posted. I am very rusty in ASP, but I know in ASP.NET you can check for something like IsPostBack. Hope that helps you out.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.