asp.net - Eval script for server side control's ID property? -
Using the following Eval script to set the ID property generates an error. Error Message: The server tag is not well formed.
& asp: panel runat = "server" id = "& lt;% # Eval (" RENTER_ID ")%> viewable =" false "& gt;
< / Pre>Even when using an error message "Replace id property with error.", While using its error message
"ID properties of any control only attribute ID tags Example can be set using:
& lt; Asp: button runat =
You can not do this
Why do you want to? If so, you can refer to it at some point, you can use client-side ID through property.
Example, as requested:
& lt; Asp: repeater runat = "server" id = "refex" & gt; & Lt; ItemTemplate & gt; & Lt; ASP: Panel Run = "Server" ID = "PNLFU" & gt; & Lt; Input type = "button" onclic = "alert ('& lt;% # container.fund control' (" PNLFu ") .client ID%>;);" Value = "Click to get an ID & lt;% # ContainerEight Index% & gt;" / & Gt; & Lt; / ASP: Cell & gt; & Lt; / ItemTemplate & gt; & Lt; / ASP: Repeater & gt;
Comments
Post a Comment