Click here to Skip to main content
16,019,577 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, i m the biggner of asp.net..i have a problem so i hope u will notice it and suggest me a good solution " in my .aspx form i added autogenreted gridview and bind it but at the time of editing the textbox is appeared now i hav problem here--[i want to set width of that autogenreted textbox ]" could u tell me ,is their any way to set width of that textbox which is genreted at runtime..

thank you ..
Posted

you can Give Css to it
CSS
.test
{   width:120px;
}

C#
TextBox txt = new TextBox();
                txt.CssClass = "test";
 
Share this answer
 
Comments
raksha dongre 26-May-12 8:52am    
Thanks for suggesting me this solution but now next problem is arising in front of me that is "How can I use this CSS code file in .aspx file or how can i call it to execute the code " please help me to find solution over this.

Hoping your replay will come soon..Thank You
You need to control the column width the text box in that column will automatically adjust..

Please refer the link below

http://forums.asp.net/t/1121794.aspx
 
Share this answer
 
Comments
raksha dongre 26-May-12 8:54am    
Sorry it was not helpful to me,please suggest another solution .

Thank You

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900