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

create aspx and aspx.vb files?

Status
Not open for further replies.

Shift838

IS-IT--Management
Jan 27, 2003
987
US
I want to use ASP.NET for my web forms and use VB.net as the codebehind. I want to be able to dynamically create a default.aspx and a default.aspx.vb code behind file. The code it will generate will be dependant upon the checkboxes a user checks. Can the codebehind page be created dynamically and be called by the aspx page ?

I now visual studio code behind is just a nice smart text code editor. Is there anything that I need to add to make sure it generates the file correct so the aspx file can use it as a code behind?

 
In VS 2003, when you create your aspx page, you will note on the first line that it has the codebehind listed in the Page directive. It is done for you automatically so you should not need to do anything else.

------------------------------------------------------------------------------------------------------------------------
"I am not young enough to know everything."
Oscar Wilde (1854-1900)
 
I know this. I am asking if I create it on the fly through vb.net by opening a file for output if there is anything I need to specify on either the aspx page or the aspx.vb page. so what I need to know is what is done automatically on these pages that I need to include in my code to print to the file.
 
Could I ask why you actually need to create a new page on the fly...I can't think of any reasons why you would want to do that (also it wouldn't work as it would have to be compiled)?

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

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
based on users selections on a web page on what they want a registraton site generated to such as some users may want to have their registration site to have information like, first name, last name and email only, others may want all that plus other contact information. This what dependant on what checkboxes have been selected will depend on what the web page is generated. I know I can generated in .net a standard ASP file that will do it, but I want to stay with .net if possible.
 
Personally, I would go with an option that contained all controls and hide them if they are not needed (this could be set in a number of ways including in the querystring, hidden inputs etc). This way it will compile, your initial thinking means it won't.

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

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Can you elaboration on this. Do you mean just create a form that has all the controls and based on their selections which controls would be active or not. So store something in my sql database that it will pull or what?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top