473,320 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Setting textbox width from server side

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


Nov 17 '05 #1
2 8790
dim tb as new Textbox()
tb.width = system.web.ui.webcontrols.unit.pixel(80)
"Harry" <No******************@yahoo.com> wrote in message
news:#M**************@tk2msftngp13.phx.gbl...
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

Nov 17 '05 #2
Thanks!

"Onur Bozkurt" <on**********@softhome.net> wrote in message
news:uX**************@TK2MSFTNGP10.phx.gbl...
dim tb as new Textbox()
tb.width = system.web.ui.webcontrols.unit.pixel(80)
"Harry" <No******************@yahoo.com> wrote in message
news:#M**************@tk2msftngp13.phx.gbl...
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


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Rodrigo DeJuana | last post by:
Howdy, I'm new to this .net stuff and really have little to no training. Im trying to create a new page for a web form, so i have been pretty much jsut coping code. I having some issue with...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
6
by: Andre Ranieri | last post by:
I'm trying to create a login page for customers to log into our corporate website, our presidents naturally wants the user and password fields to populate from a cookie so the customer doesn't have...
3
by: Sandy | last post by:
Hello - I have a page that runs a stored procedure checking for the existence of a name in a database. If it exists, lblMessage returns text indicating same. When a user goes back and clears...
0
by: msnews | last post by:
I need to read the value typed into a textbox (textbox.txt) and then use it in some code that looks like this: Sub Button3_OnClick on error resume next dim CompName Compuser =...
2
by: Calvin KD | last post by:
Hi everyone, I have a number of textboxes, lined up in a html table. I have split the table into different columns. The column widths are all relative, that is, % rather pixels or points so that...
0
by: Reena | last post by:
Hi, Working with ASP.NET 2.0 with Masterpages. Here is my datagrid... <asp:DataGrid ID="dgSelectedFields" runat="server" BorderStyle=None GridLines="None" CssClass="grdData"
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
4
by: Jeff | last post by:
hi asp.net 2.0 I have created a custom web control, here is it's header: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="EditUserBox.ascx.cs" Inherits="Controls_EditUserBox" %> ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.