im trying to get data-attribute (data-icon) from an HtmlControl ... that data-attribute is setted from a js function, but when the page do postback it returns (on codebehind) an empty string
theres any way , any property or else to get it??
My Code:
HTML:
<button id="btnIcon" runat="server" class="btn btn-default iconpicker" data-icon=""></button>
Code behind:
string icon = btnIcon.Attributes["data-icon"].ToString();
PS: the attribute is changed via jQuery by a js plugin.