473,406 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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.
Apr 11 '06 #1
4 1323
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.

Apr 11 '06 #2
have you tried Display="Dynamic" option on the validator
?

"Dabbler" <Da*****@discussions.microsoft.com> wrote in message
news:D1**********************************@microsof t.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.

Apr 11 '06 #3

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" <Da*****@discussions.microsoft.com> wrote in message
news:D1**********************************@microsof t.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.


Apr 12 '06 #4
glad to help -- let us know if it works
"Dabbler" <Da*****@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.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" <Da*****@discussions.microsoft.com> wrote in message
news:D1**********************************@microsof t.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.
>>
>>


Apr 12 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Richard | last post by:
http://geocities.com/r_bullis/gallery2.html Validator 3 at w3c totally annhialates the page. It doesn't like comment tags, nor does it like "alt" not being used with img tags. While the jigsaw...
0
by: Brian Rice | last post by:
I created a form with three panels on it for multi-page input. Each panel has a next button (Next1, Next2, and Next3). I start with only Panel1 visible. When I click on Next1 I make Panel2...
3
by: John Blair | last post by:
Hi, I have validators outside of a datagrid (for adding a new grid row) - however when i click "edit" column and then the "update" column of a grid row that has been edited - my other...
1
by: psparago | last post by:
I have developed a tab user control in which each tab is itself a user control and the tab selection control is a datalist. Each tabbed user control has zero or more validator controls on it. The...
2
by: James Frayne | last post by:
Hi, I am trying to integrate phpBB into my existing site design. I am doing this simply by pasting fragments of my HTML into the phpBB templates. This works fine in Firefox and Opera but the...
7
by: Adrian Parker | last post by:
Having a problem with validators. Because we want to only test whether the current field in a changed event is valid before we process the change code, I have tried to turn off all validators for...
0
by: savvy | last post by:
I'm having some background graphics layout on the page and a table layout on top of it. Inside the table i have two DropDownList menus whose AutoPostBack Property is set to true and I'm using two...
4
by: Madhur | last post by:
Hello All I am learning how to use ASP.NET Validators and would appreciate if someone could provide me with guidance. I have written very simple ASPX page below with a Dropdown list, a...
2
by: Alec MacLean | last post by:
Hi, I have a page using AJAX. The page has three modal popups that work fine when I don't have field validators in place. As soon as I put a validator in place, the popup "form" the validator...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.