Runtime in Asp.Net 2.0

S

shapper

Hello,

When I create a web site I usually create an .aspx and an .aspx.vb file
for each page.
However, I create all my page code in my VB code at runtime.

What I would like to know is:
Is there a development model where the Aspx pages (.aspx files) are
also created at runtime.

If yes could you tell me if should I do it?

Can you give me any advice on creating everything at runtime in my VB
or C# code?

Thanks,
Miguel
 
G

GroupReader

I'm sorry, but I had to ask: Why?

It's so much nicer and easier to code html and javascript in the .aspx
page rather than the code-behind page, so why would one want to code it
all in the code-behind? This is not a slam, I truly am curious.
Thanks, and I hope you'll take the time to reply.

Here's a thought that actually might help answer your question...
There's a feature of ASP.Net 2.0 called "VirtualPathProvider" which
allows you to serve up web pages from your database. The physical files
don't need to exist on the server. If you can serve them up from the
database without them existing first, there's probably a way to
generate pages and "serve them up" without actually grabbing them from
the db. Hope this helps.
 
S

shapper

Hi,

I have all javascript code in .js files, .css in css files and VB / C#
e in vb/cs files.

I thinks it's easier to mantain and organize code.

I only use Asp.Net server controls.
This way defining their properties in my VB/C# code becomes much
cleaner than having everything in my HTML code. There everything is a
mess and finding something is a big problem.

Besides this, many times I need to work with AJAX and runtime code and
having the code that creates and defines the page in my VB/C# becomes
easier.

Thanks,
Miguel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top