c# - Find control created in Code-behind using jQuery -



c# - Find control created in Code-behind using jQuery -

i want able access label command in jquery created in codebehind.

i have added controls page in codebehind so

label l = new label(); l.id = "txt" + i; l.text = dr["category_name"].tostring(); l.cssclass = "heading"; divcat.controls.add(l);

is possible find these controls via id or alternative alternative in jquery? next gives error saying there no such control:

$(function () { $(".hoverlabel").hover(function () { $("#<%=txt1.clientid %>").show(); }); });

i not sure work or not. can take benefit of clientidmode="static" eg.

<asp:textbox id="txtecho2" runat="server" clientidmode="static" />

in case

label l = new label(); l.id = "txt" + i; l.text = dr["category_name"].tostring(); l.cssclass = "heading"; divcat.controls.add(l); l.clientidmode= clientidmode.static;

and jquery function

$(function () { $(".hoverlabel").hover(function () { $("#txt1").show(); }); });

c# jquery asp.net

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -