Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replacing textbox width within style
Message
De
23/12/2015 23:20:32
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Replacing textbox width within style
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01629273
Message ID:
01629273
Vues:
37
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform