CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Peter's Gekko

public Blog MyNotepad : Imho { }

Moving to 2003 and templates

hi everybody,

finally moved a project from VS.NET 2002 to 2003. Should have done that before. The feel and speed of 2003 is far better than 2002. A lot of details , the code completion is indeed more intellligent, the performance is snapier on my over-stressed system and the editting of templates is not as flaky as in 2002. So even if you don't need the 1.1 framework (why not, it's the default download) : go for 2003.

I experienced one small conversion issue: One of the webforms included a helper class, this class came first in the unit. Trying to design the form VS.NET told me it can only design the first class in the unit. One cut and paste later I was up and designing.

The project uses a lot of templates in a datalist. (More on that in an upcoming story.) When the template is rendered  to html asp.net makes up an ID for the controls in the template. It will be something like "DataList1__ctl1_Label2". It's a pitty you cannot read this ID from your code. In the datalist events the ID will allways be "Label2", without all the prefixes. I would like to have this ID to generate snippets of client side script. Now I have to hard-code the controls' ID. To find out the ID I view the source in IE. Does anybody know a way out ?

 

 



Comments

slobodan filipovic said:

Maybe you can use:Control.ClientID Property
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebUIControlClassClientIDTopic.asp
# July 27, 2003 10:29 PM

Peter van Ooijen said:

That's it ! Thanks a lot.
# August 4, 2003 3:04 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add
Check out Devlicio.us!