Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Setting textbox width from server side

Reply
Thread Tools

Setting textbox width from server side

 
 
Harry
Guest
Posts: n/a
 
      06-26-2003
Hi

I'm trying to set the width of a textbox from the server side. I've tried

dim tb as new Textbox()
tb.width = "80"

but this gives me an error saying that the
"value of string cannot be converted to 'System.Web.UI.WebControls.Unit'"

How would I set the width? I've also tried

tb.width.pixels(80) and that does not seem to change the width.

Thanks
Harry




 
Reply With Quote
 
 
 
 
Onur Bozkurt
Guest
Posts: n/a
 
      06-26-2003
dim tb as new Textbox()
tb.width = system.web.ui.webcontrols.unit.pixel(80)


"Harry" <(E-Mail Removed)> wrote in message
news:#MDPVe$(E-Mail Removed)...
> Hi
>
> I'm trying to set the width of a textbox from the server side. I've tried
>
> dim tb as new Textbox()
> tb.width = "80"
>
> but this gives me an error saying that the
> "value of string cannot be converted to 'System.Web.UI.WebControls.Unit'"
>
> How would I set the width? I've also tried
>
> tb.width.pixels(80) and that does not seem to change the width.
>
> Thanks
> Harry
>
>
>
>



 
Reply With Quote
 
 
 
 
Harry
Guest
Posts: n/a
 
      06-26-2003
Thanks!

"Onur Bozkurt" <(E-Mail Removed)> wrote in message
news:uXiJaj$(E-Mail Removed)...
> dim tb as new Textbox()
> tb.width = system.web.ui.webcontrols.unit.pixel(80)
>
>
> "Harry" <(E-Mail Removed)> wrote in message
> news:#MDPVe$(E-Mail Removed)...
> > Hi
> >
> > I'm trying to set the width of a textbox from the server side. I've

tried
> >
> > dim tb as new Textbox()
> > tb.width = "80"
> >
> > but this gives me an error saying that the
> > "value of string cannot be converted to

'System.Web.UI.WebControls.Unit'"
> >
> > How would I set the width? I've also tried
> >
> > tb.width.pixels(80) and that does not seem to change the width.
> >
> > Thanks
> > Harry
> >
> >
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
trouble with DataCell Width and Width of Textbox Jeff ASP .Net 1 10-08-2008 04:18 AM
how to clear server side textbox using client side code? john22 ASP .Net 0 11-06-2007 03:24 PM
Textbox width scaling to width of data not width of page? AndrewF ASP .Net 1 10-10-2005 04:38 PM
css - setting width based on browser width ppcguy HTML 3 08-26-2005 06:51 AM
How can textbox in server-side shows client-side's value Jack ASP General 4 11-26-2003 05:03 PM



Advertisments