autoresize and asp.net
Why doesn't work my project.I want use jquery autoresizable for my asp.net textbox?
Like this http://james.padolsey.com/javascript/jquery-plugin-autoresize/
This is code from master page..
http://www.djkbf.hr/~atokic/code.t开发者_Go百科xt
It is because your TextBox is inside a ContentPlaceHolder in the MasterPage. The ID gets modified when the page renders to something like ctl00_blah.
Try using a class selector instead like so:
$('textarea.jk').autoResize();
That should do the trick. In ASP.NET 4.0 you can force the ClientId to keep the name you specify, but I would just recommend using classes to make it easier. Another option would be to use ASP.NET to render the ClientId in the page like so:
$('textarea#<%=demo.ClientID %>').autoResize();
精彩评论