server textbox control, browser compatibility

W

will eichert

Here's an easy one (2nd time I've posted this issue, maybe I'll get a
reply this time!):

How do you use the web server textbox control in different browsers
(IE works fine, but Netscape & Mozilla don't). The width of the
control is ignored.

I've tried the different settings for targetSchema in the document
class that contains the form, and it didn't seem to make any
difference.

One of the controls:
<asp:textbox id="address" style="LEFT: 24px; POSITION: absolute; TOP:
280px" runat="server" Width="320px" Height="19px"></asp:textbox>

To contact me via email, remove the DELETEME in the address.

Thanks,

Will
 
A

Alan Corbett \(.NET MVP\)

Will,

You may try setting the height/width via the style:

<asp:textbox id="address" style="LEFT: 24px; POSITION: absolute; TOP:
280px; HEIGHT: 19px; WIDTH: 320px" runat="server"></asp:textbox>

-Alan
 
W

will eichert

Thanks, that works.

Is there a way to have the .Net IDE create server controls this way by
default? It's a lot of trouble to change each one in the html... And
why didn't Microsoft do it that way in the first place? I don't care
what browser you prefer, most internet websites need to support more
browsers than just IE...

Thanks again,

Will
 
A

Alan Corbett \(.NET MVP\)

lol, I'm going to conspicuously not answer those questions.

No, I know of no way to enable that sort of functionality within the
IDE...of course, stylesheets would do the trick, assuming you wanted the
textboxes the same size.
 
C

Chris Lane

-----Original Message-----
Thanks, that works.

Is there a way to have the .Net IDE create server controls this way by
default?

Not that I know of but maybe via a User Control.
It's a lot of trouble to change each one in the html...


Just use a style sheet with an HTML-Server INPUT Text
control instead and give your related Input Controls a
class name.
 
C

Chris Lane

Sorry this works with Web Controls too but give the
controls that you want to change style on a CSSClass name
so as to not affect the styles of other controls not
intended to change.
-----Original Message-----
-----Original Message-----
Thanks, that works.

Is there a way to have the .Net IDE create server controls this way by
default?

Not that I know of but maybe via a User Control.
It's a lot of trouble to change each one in the html...


Just use a style sheet with an HTML-Server INPUT Text
control instead and give your related Input Controls a
class name.
And
why didn't Microsoft do it that way in the first place?
I
don't care
what browser you prefer, most internet websites need to support more
browsers than just IE...

Thanks again,

Will
 
A

Alan Corbett \(.NET MVP\)

right.

We typically extend all the controls and add a default property to the
CssClass, among other things.


Chris Lane said:
Sorry this works with Web Controls too but give the
controls that you want to change style on a CSSClass name
so as to not affect the styles of other controls not
intended to change.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top