We will be undergoing scheduled maintenance on May 20th, 2013 at 02:00 GMT.
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com�s entire library of video tutorials.
ClientIDs and by ClientIDs I'm talking about the identifier for controls in ASP.NET 4 have gotten a lot of attention and you're going to like what's happened. Now to understand the significance of some of the changes in ClientIDs in version 4 here, you need at first, to take a look at some historical facts. Client Side Scripting is going to require that every control has a unique ID and in ASP.NET that is the ClientID Property. Because obviously if I'm going to programmatically do something with my controls, then I need to be able to uniquely identify each one of the controls in code. Now in versions of ASP.NET prior to number 4 here, the ClientID Property has been read only and so when it's read only, then obviously you can't make any changes to it. The .NET Framework generates that ClientID for you. Now sometimes that can be good except for this one simple fact, you don't know what the actual ClientID will be until Runtime because this has to be submitted to the server so that the NET Framework can generate and assign that ClientID and then certain actions that might take place, moving the control, a lot of other things can cause a different ClientID to be generated. And so it's very hard to write any kind of script that's going to work if the Framework or certain conditions in the program are going to cause your ClientIDs to change because now your code is not affecting the proper controls. So now, let's talk about ASP.NET 4 is offering in the area of fixes for these kinds of problems. First of all, the ClientID Property is no longer read only. Now this is going to be big for Client Side programming in ASP.NET because now since this is not read only, you can set the ClientID Property at Design Time. Now this is big for a lot of Client Side functionalities in ASP.NET and you're probably going to see something about this on the exam. Now not only can the ClientID Property be set at Design Time, it can be set at the control level, the page level or even the application level by going into the Web.Config file. Now there are four options for ClientID Settings, I'm just going to show them to you here and then I'll explain them in a separate video but there is Static, Legacy, Inherit and Predictable. Now you're going to set all of these regardless of which ClientID Setting or Client Mode you're in, you're going to set two attributes to work with ClientIDs in ASP.NET 4. The first one's ClientIDMode. Now ClientIDMode refers to these 4 up here, these 4 Options and then the actual ClientID itself. So ClientIDs have gotten some fair amount attention in ASP.NET 4. It's good stuff watch for it on the exam.
| Course: | Designing and Developing ASP.NET 4 Web Apps (Exam 70-519) |
| Author: | Mark Long |
| SKU: | 34292 |
| ISBN: | 978-1-61866-029-9 |
| Release Date: | 2011-12-31 |
| Duration: | 8.5 hrs / 108 lessons |
| Work Files: |
Yes |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |