Overview of .NET 4.0 features – ASP.NET 4.0 ClientIDMode(dotnetcube.com)

submitted by dncdudedncdude(1350) 2 years, 8 months ago

In pre 4.0 days, when a server control is rendered, the framework would assign an ID to the control based on the control hierarchy. For example, a textbox of id "txtTest" in a user control that is used on a page would be rendered with the ID "WebUserControl11_txtTest". Developers could use the ClientID property (ex: txtTest.ClientID) in the code behind to retrieve the ID assigned to the control by the framework. It was essential for the framework to assign the IDs this way to maintain uniqueness of the IDs on a page. In the prior example, the User Control that inherits from the System.Web.UI.UserControl implements the INamingContainer interface. Any control (either custom or a .NET control) that implements this interface would ensure unique naming scope for the child controls.

2 comments |category: |Views: 611

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:
information Login or create an account to comment on this story