Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Ibthaj Mansour   on Sep 16 In Asp.net Category.

  
Question Answered By: Tarrant Thompson   on Sep 16

I don't think ts weird behaviour Mark.

It seems when you add controls  programmatically they are added after the stuff
in the designer is rendered.

I made a project earlier - have look - it does the same thing

http://www.developer.com/webapplication123.zip

The designer and in-mem code  are 2 different things - the designer is rendered
first when mixing them.
And ascx controls get rendered before their equivalent in-mem (see the above
project ... it's got most of it in there)
I don't thik it is designed to have them mixed, but it has that added
functionality.

I suppose the idea is that if you were to add controls programmatically then you
would get rid of all the html in the designer and add your own controls to
render a <html> and <head> and <body> tags yourself.

I'm quite happy getting rid of the html in designer and don't expect VS to be
perfect in every way, I don't even lik eth edesigner anymore - but luuuurrvvvvv
doing it all in code.

Share: