Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   validators messing up layout in IE before being triggered? (http://www.velocityreviews.com/forums/t123506-validators-messing-up-layout-in-ie-before-being-triggered.html)

=?Utf-8?B?RGFiYmxlcg==?= 04-11-2006 04:54 PM

validators messing up layout in IE before being triggered?
 
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.



=?Utf-8?B?RGFiYmxlcg==?= 04-11-2006 05:04 PM

RE: validators messing up layout in IE before being triggered?
 
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.

"Dabbler" wrote:

> 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.
>
>


Swanand Mokashi 04-11-2006 05:16 PM

Re: validators messing up layout in IE before being triggered?
 
have you tried Display="Dynamic" option on the validator
?

"Dabbler" <Dabbler@discussions.microsoft.com> wrote in message
news:D16AC83D-DAE9-4507-A017-C56623202D15@microsoft.com...
> 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.
>
> "Dabbler" wrote:
>
>> 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.
>>
>>




=?Utf-8?B?RGFiYmxlcg==?= 04-12-2006 02:01 AM

Re: validators messing up layout in IE before being triggered?
 

Thanks, I hadn't even know about it. I'll give it a try.


"Swanand Mokashi" wrote:

> have you tried Display="Dynamic" option on the validator
> ?
>
> "Dabbler" <Dabbler@discussions.microsoft.com> wrote in message
> news:D16AC83D-DAE9-4507-A017-C56623202D15@microsoft.com...
> > 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.
> >
> > "Dabbler" wrote:
> >
> >> 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.
> >>
> >>

>
>
>


Swanand Mokashi 04-12-2006 01:58 PM

Re: validators messing up layout in IE before being triggered?
 
glad to help -- let us know if it works
"Dabbler" <Dabbler@discussions.microsoft.com> wrote in message
news:AC1B45D6-7CEC-4D9B-85DA-0E9F9EF49833@microsoft.com...
>
> Thanks, I hadn't even know about it. I'll give it a try.
>
>
> "Swanand Mokashi" wrote:
>
>> have you tried Display="Dynamic" option on the validator
>> ?
>>
>> "Dabbler" <Dabbler@discussions.microsoft.com> wrote in message
>> news:D16AC83D-DAE9-4507-A017-C56623202D15@microsoft.com...
>> > 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.
>> >
>> > "Dabbler" wrote:
>> >
>> >> 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.
>> >>
>> >>

>>
>>
>>





All times are GMT. The time now is 07:35 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.