Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replacing textbox width within style
Message
From
23/12/2015 23:20:32
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Replacing textbox width within style
Environment versions
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01629273
Message ID:
01629273
Views:
38
I have some code like this:
            loTextbox = loUserControl.FindControl("LXFrameworkLabel")
            loTextbox.Width = 281
This replaces the width of a textbox control in an .aspx page:
<asp:TextBox ID="LXFrameworkLabel" runat="server" width="263" style="border-right: 0px;"></asp:TextBox>
This works.

Now, if I would like to style everything in the aspx page such as:
<asp:TextBox ID="LXFrameworkLabel" runat="server" style="width: 263px; border-right: 0px;"></asp:TextBox>
...this won't work.

Instead, .NET will add another width definition on the control.

What approach are you using from the .NET code to make sure the width will always be overwritten, no matter if it is a property of the textbox control or within the style?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform