Learning Curve…

ClientIDMode…

Posted on: March 1, 2011

Starting with ASP.NET 4, each web control now has a ClientIDMode property that enables you

To determine the way the client ID is made up. You can set the ClientIDMode to any of these four values:

1. AutoID: – Generates the ID as it did in previous versions of ASP.NET.

2. Predictable: – This value is mostly used for data-bound controls and enables you to create predictable client IDs for repeating elements. The client ID of a control is generated by concatenating the client ID of the parent control and the server ID of the control itself. The ID can optionally be extended with a unique value for each element using the ClientIDRowSuffix property.

3. Static: – With this value the client ID will be exactly the same as the server ID that you set. This enables you to explicitly set the client ID, giving you greater control. However, it doesn’t prevent you from assigning the same value twice, which may result in duplicate IDs in the client’s HTML. Use with care!

4. Inherit: – With this setting the control inherits its ClientIDMode value from its parent control.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Author

Learning days (Calendar)

March 2011
M T W T F S S
« Feb   May »
 123456
78910111213
14151617181920
21222324252627
28293031  

Knowledge Bank (Archives)

I am on Twitter

Blog Stats

  • 503,999 hits

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 43 other followers

%d bloggers like this: