silvawolf Posted September 15, 2003 Posted September 15, 2003 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 Quote
Moderators Robby Posted September 15, 2003 Moderators Posted September 15, 2003 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. Quote Visit...Bassic Software
silvawolf Posted September 17, 2003 Author Posted September 17, 2003 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. Quote
Moderators Robby Posted September 17, 2003 Moderators Posted September 17, 2003 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. Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.