We have been using ClientID’s in ASP.NET 2.0/3.5 that makes each control to generate the unique client side id attribute to that page or browser. But these ID’s were long and randomly generated. Developers who work on Client-Side programming that uses Java Script, JQuery or Ajax have been suffering a lot spending considerable amount of time when it they need to reference those ClientID’s in the client side scripts.
Now the good news is that, ASP.NET 4.0 comes with new ClientIDMode property, gives full control to the developer on the ClientID’s generated by ASP.NET controls.
ClientIDMode can take the following four possible values
1.Control Level
2.Page Level
3.Application Level
Setting ClientIDMode at Control Level
Each and every server control in ASP.NET 4.0 has this property and the default value is inherit.
Setting ClientIDMode at Page Level
Setting ClientIDMode at Application Level
You need to set it at System.Web section of Web.config
Now the good news is that, ASP.NET 4.0 comes with new ClientIDMode property, gives full control to the developer on the ClientID’s generated by ASP.NET controls.
ClientIDMode can take the following four possible values
- AutoID / Legacy - ASP.NET generate IDs as it does in v3.5 and earlier versions.
- Static - ASP.NET use exactly the same ID given to the server control for its client-side ID.
- Predictable - ASP.NET try to generate IDs that are guessable from looking at the structure of the page.
- Inherit - ASP.NET generate a client-side ID for the page or control using the same ClientIDMode as its parent. i.e. the client ID gets inherited from the parent control.
1.Control Level
2.Page Level
3.Application Level
Setting ClientIDMode at Control Level
Each and every server control in ASP.NET 4.0 has this property and the default value is inherit.
1.
<asp:panel id=
"pnl"
runat=
"server"
cssclass=
"newStyle1"
2.
ClientIDMode =
"Static"
> </asp:panel>
1.
<%@ Page Language=
"C#"
ClientIDMode =
"Inherit"
2.
AutoEventWireup=
"true"
3.
CodeBehind=
"Category.aspx.cs"
4.
Inherits=
"WebApplication3.Cat"
%>
You need to set it at System.Web section of Web.config
1.
<system.web>
2.
<pages clientIDMode=
"Predictable"
>
3.
</pages>
4.
</system.web>
Really an awesome post. I wondered by reading this blog post. Thanks a lot for posting this unique post which you have shared with us. Keep on posting like this exclusive post with us.
ReplyDeleteBest Seo Services in Chennai
you are posting a good information for people and keep maintain and give more update too.
ReplyDeleteseo services india
I really liked this part of the article, with a nice and interesting topics have helped a lot of people who do not challenge things people should know... you need more publicize this so many people who know about it are rare for people to know this......
ReplyDeleteSoftware Testing Training in Chennai
SEO Training in Chennai
Informatica Training in Chennai
Digital Marketing Training in Chennai
Great thoughts you got there, believe I may possibly try just some of it throughout my daily life.
ReplyDeleteIt's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command
This blog is the general information for the feature. You got a good work for these blog.We have a developing our creative content of this mind.Thank you for this blog. This for very interesting and useful.
This is a nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
Its really an Excellent post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog. Thanks for sharing....
Awesome article. It is so detailed and well formatted that i enjoyed reading it as well as get some new information too.
r-programming Training in rajajinagar
r-programming Training in bangalore
Rprogramming Training in velachery
Rprogramming online Training
Rprogramming Training
r-programming Training in Bangalore
I would like to thank you for the efforts you have made in writing this article about software testing. I am hoping the same best work from you in the future as well.
ReplyDeleteSoftware Testing Services
Software Testing Services in India
Software Testing Companies in India
Software Testing Services in USA
Software Testing Companies in USA
Software Testing Companies
Software Testing Services Company
Software Testing Companies in New York
smm panel
ReplyDeleteSmm panel
İs İlanlari Blog
İnstagram Takipçi Satın Al
hirdavatciburada.com
beyazesyateknikservisi.com.tr
servis
tiktok jeton hilesi
kadıköy lg klima servisi
ReplyDeleteataşehir daikin klima servisi
kartal lg klima servisi
ümraniye lg klima servisi
kartal alarko carrier klima servisi
ümraniye alarko carrier klima servisi
pendik bosch klima servisi
pendik arçelik klima servisi
tuzla samsung klima servisi