Client ID Mode is new in ASP.NET 4.0. There's more information about it in the breaking changes for ASP.NET v4.0.
Why isn't the ClientIDMode being honored here?
-
13-04-2022 - |
Вопрос
I have an ASP.NET 2.0 web application, and on one of the pages I have a div
defined like this:
<asp:Panel runat="server" ID="pnlAddJobCode" Visible="false" ClientIDMode="Static">
and it's inside of a content placeholder defined like this:
<asp:Content ID="Content3" ContentPlaceHolderID="MainBodyContent" runat="server">
but when the HTML is generated I get a name like this ctl00_MainBodyContent_pnlAddJobCode
so clearly it's not honoring the ClientIDMode
. The problem is I need to set some styles on this specific div
-how can I get the ClientIDMode
to work here?
Does ClientIDMode
not work in ASP.NET 2.0? I have found a few articles on Google that elude to it not working, but nothing concrete.
Решение
Не связан с StackOverflow