question for professsional asp developer

S

suzy

hi,

i am a professional asp developer, and when i used to code in normal ASP
code i didn't use the design view in interdev. instead i just used code to
draw any tables/forms, etc that i needed.

my question is that is this still the best way to develop for professional
coders (instead of dragging control onto a web form in design view)?

the reason i am asking is because i'm new to asp.net and don't understand
how to draw tables/hyperlinks etc dynamically.

until now, if i require a control on a page (eg: a table), i draw it onto a
page using design view, and then alter the properties accordingly. and to
be honest i dont like this way at all.

can anyone offer any tips for a professional developer - is the design view
meant to be for beginners?
 
K

Kevin Spencer

Is the design view meant for beginners? Heavens no! It's a productivity
tool, just like any other productivity tool. If you make the best use of it
possible, you can develop your ASP.Net applications in much less time than
hand-coding alone. However, it does have its strengths and weaknesses, and
personally, I try to augment it with other tools. For example, I use
Microsoft FrontPage to lay out my basic HTML, including any form fields
which will become HtmlControls. I leave placeholder HTML (such as empty
table cells, for example) for WebControls and custom Server Controls. Then,
when I've got the basic HTML looking good, I copy and paste it into the
Visual Studio designer, because the designer is not good at doing HTML. In
the Design view, I can then right-click the HTML form fields to make them
HtmlControls, drag and drop the necessary WebControls and Custom Server
Controls into their respective places, maybe do a little hand-tweaking of
the HTML Template, and then go straight to the CodeBehind to plug in all the
server-side functionality required.

It's all just a matter of identifying the best productivity tools in the
best possible combination, by identifying the strengths and weaknesses of
available tools. I'm sure there are other great combinations of tools being
used out there as well.

--
HTH,

Kevin Spencer
..Net Developer
Microsoft MVP
http://www.takempis.com
Big things are made up
of lots of little things
 
J

John G

I agree with Kevin for the most part, although I have generally found
the designer to be of little use for most complex projects. Once you
expand on the built in framework of ASP.NET (ie: by creating a new
page class, or trying to use some sort of page templates) the designer
tends to get a little flaky...

That said though, if you are able to use it to get the basic structure
of your pages together then it can save hours...

Dynamic controls in asp.net take some getting used to, and in
generally do not get along very with ASP.NET postback/viewstate/event
framework. You can do almost exactly what you would have done in ASP
using by overriding the Render method of the Page object and using
writer.Write("") statements, but you will lose all the benefits of
ASP.NET mentioned above.

Creating dynamic controls that can participate in postback etc have to
be created in the OnCreateChildControls method or OnInit method. the
problem is that they also have to be the same on every postback, so in
the end they are not really all that dynamic.

If possible you can create a bunch of controls and change the Visible
property to draw the relevent ones, but this does nto work for all
situations.
 

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

Similar Threads


Top