Ponder points. "code behind" framework

G

Girish

I understand that the code behind concept is a framework that separates code
logic from visulization code.

I belive this is true for pages that are mostly static. Ie. Forms elements
on a page that are fixed in number.

What if i had a requirement that involves a highly dynamic page, with a
dynamic number of form elements based on various user selections. I cant
see how I cant separate code that splits the "form generation logic" as a
code behind and have another file that would just hold "visulisation code".

Any thoughts on this?

Thanks,
Girish
 
M

Marina

If your page is completely unpredictable, then the .aspx page would be
pretty much empty, and the code behind would truly generate all the content.
It can do this by dynamically creating elements (textboxes, labels, grids,
etc) and adding them to the page at run time.

Otherwise, your page might have placeholders for certain pieces, and your
codebehind would filll in the blanks at run time depending on what it needed
to do.

So this model allows for any level of extensibility. The page can be
completely static, or completely dynamic, and this model supports both.
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top