I am trying to change my textbox's width according to textbox's value but it does not seems like working. Here is my aspx:
<asp:TextBox ID="TxtbSizeOzel" runat="server" CssClass="text-center"></asp:TextBox>$ I create an onKeyUp event for resizing method in codebehind:
TxtbSizeOzel.Attributes.Add("onKeyUp", "Expand(this)"); And lastly my javascript method:
function Expand(obj) { if (!obj.savesize) obj.savesize = obj.size; obj.size = Math.max(obj.savesize, obj.value.length); } I don't get any error but it just doesn't working.