Jump to content
Xtreme .Net Talk

How do I combine multiple pages into one .aspx page?


Recommended Posts

Posted

I've recently moved to .NET so please forgive my newbishness.

 

I have an application script written in PHP. It's composed of 4 pages, but it's all hard-coded into a single .php file. On the first page, you enter your details. If there was an error in the details, then the second page displays the errors, otherwise it skips to the third page, which displays a 'Terms' section and has an 'I Agree' button, which the user must click to proceed to the fourth page. The fourth page sends an email to the administrator (me) and informs the user that the application was submitted.

 

I was wondering how (if possible) this could be accomplished using a single .aspx file and code-behind.

 

Thanks

  • Moderators
Posted

There are many ways of accomplishing this, one way would be to keep it all in a single aspx file (as you mentioned).

 

You can use Panels to contain the controls needed for each section, then simply show the appropriate panel as needed.

Since the aspx will PostBack to the same page this task should not be too complex.

Visit...Bassic Software
Posted
I guess what I'm trying to say is, I don't want all the code jumbled in a single file.. I want the presentation (HTML) separated from the implementation (C#), and if possible, I want the pages to be in separate files (.html files or .aspx files, I'm not sure), but at the same time, I want the user to access it all from a single page (.aspx), which means it's probably self-posting.
  • Moderators
Posted
The suggestion above would of course use code-behind, it's up to you if you want to use multiple aspx files or only one, my preference in this case would be to use a single aspx file with code-behind.
Visit...Bassic Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...