Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 06, 2012 01:47 PM by oned_gk
Participant
1656 Points
1345 Posts
Nov 06, 2012 01:14 PM|LINK
using asp.net/vb.net 2010
I have a textbox inside a gridview and I need to set the width of it using session value
trying the following but its giving me an error about the "%" signs inside a server tag
<asp:TextBox ID="txtProductPrice" runat="server" Width="<%=Session("ColWidth")%>px" > </asp:TextBox>
does anyone know the correct syntax that I can use to do this?
thanks
MC
All-Star
35904 Points
7336 Posts
Nov 06, 2012 01:23 PM|LINK
Nov 06, 2012 01:33 PM|LINK
oned_gk Width='<%# Session("ColWidth")%>' or Width='<%# Session("ColWidth") & "px" %>'
thanks but neither suggestion is working
Nov 06, 2012 01:47 PM|LINK
MyronCope
Participant
1656 Points
1345 Posts
Set width of asp.net textbox inside a gridview using Session value
Nov 06, 2012 01:14 PM|LINK
using asp.net/vb.net 2010
I have a textbox inside a gridview and I need to set the width of it using session value
trying the following but its giving me an error about the "%" signs inside a server tag
<asp:TextBox
ID="txtProductPrice"
runat="server"
Width="<%=Session("ColWidth")%>px"
>
</asp:TextBox>
does anyone know the correct syntax that I can use to do this?
thanks
MC
oned_gk
All-Star
35904 Points
7336 Posts
Re: Set width of asp.net textbox inside a gridview using Session value
Nov 06, 2012 01:23 PM|LINK
Suwandi - Non Graduate Programmer
MyronCope
Participant
1656 Points
1345 Posts
Re: Set width of asp.net textbox inside a gridview using Session value
Nov 06, 2012 01:33 PM|LINK
thanks but neither suggestion is working
oned_gk
All-Star
35904 Points
7336 Posts
Re: Set width of asp.net textbox inside a gridview using Session value
Nov 06, 2012 01:47 PM|LINK
Suwandi - Non Graduate Programmer