asp.net - using jquery with elements inside a asp:gridview -
i trying add style jquery elements inside grid-view jquery cannot identify element. trying this
$("name").css("border", "3px solid red");
thanks
the problem .net creates big long ugly names default. may call select "myinput" .net turns "somebiguglylongcontainerid$myinput". when try find "#myinput" jquery, can't because doesn't exist.
there 2 solutions. if using late enough version of .net, can set clientidmode="static", , stop .net renaming, in fact called "myinput".
the other solution inject generated id jquery inline code. $("#<%=myinput.id%>").css("border", "3px solid red");
.
Comments
Post a Comment