Reference ASP.NET control by ID in JavaScript?

前端 未结 9 1215
孤街浪徒
孤街浪徒 2020-11-28 09:25

When ASP.NET controls are rendered their ids sometimes change, like if they are in a naming container. Button1 may actually have an id of ctl00_ContentMai

9条回答
  •  日久生厌
    2020-11-28 10:16

    Oh, and I also found this, in case anyone else is having this problem.

    Use a custom jQuery selector for asp.net controls: http://john-sheehan.com/blog/custom-jquery-selector-for-aspnet-webforms/

提交回复
热议问题