validators messing up layout in IE before being triggered?

G

Guest

I have RequiredFieldValidators which are displacing my layout before the
validator is used. This only happens in IE, Firefox renders the page
correctly.

Sample useage:
<asp:Label ID="lblLastName" runat="server"
CssClass="waLabel" Text="Last Name" ></asp:Label>
<asp:TextBox ID="tbLastName" Text='<%# Bind("LastName")
%>' ReadOnly="false" runat="server" CssClass="waTextBox" Width="180px"
MaxLength="25"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="tbLastName" ErrorMessage="Last name is required"
SetFocusOnError="True" ValidationGroup="regForm">
<img src="~/images/bangs.gif" title="required"
/></asp:RequiredFieldValidator><br />

When I comment out the Validator control everything renders as it should.

Can anyone suggest a solution as the vertical spacing of my Label-TextBox
combinations isn't consistent and the form looks unprofessional.

Thanks much.
 
G

Guest

Turns out that if I remove the img tag in the Validator's content and use
text to indicate the error instead the layout renders ok. Too bad, I had a
cute exclamation point I was using to highlight the fields in error which
worked fine in Firefox.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top