What is best method to find a ASP.Net control using jQuery?

后端 未结 4 1953
我寻月下人不归
我寻月下人不归 2021-02-07 11:53

In implementing my first significant script using jquery I needed to find a specific web-control on the page. Since I work with DotNetNuke, there is no guaranteeing the control

4条回答
  •  梦谈多话
    2021-02-07 12:07

    One thing that I have done in the past (in JavaScript not jQuery), in the above my JavaScript imports, is output the dynamic controls ID's similiar to what toohool recommends and assign them to variables that I reference in my script imports.

    Something like this, should allow you to take advantage of caching and still enable you to have the exact client IDs:

    
        
    
    

提交回复
热议问题