I'm fighting the same issue right now. I've found a hack around it, but not quite what I want yet.
Here's what I've done, and it works -- at least in Firefox. Still looking for a better solution. In my Skin ASCX file, I put:
<script runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim skinUsername as Control = FindControlRecursive(Me.Page, "txtUsername")
If Not skinUsername is Nothing
CType(skinUsername, System.Web.UI.WebControls.TextBox).Style.Add("width", "100px")
End If
End Sub
</script>
This will work, but instead of removing the width or overriding it, it just adds a second. So the rendered output is style="width:130px;width:100px". Not elegant, but it works.
Thus far my attempts at .Style.Clear or .Style.Remove haven't worked. Can anyone shed light on why?
- Bryan