473,385 Members | 2,015 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,385 software developers and data experts.

serverside RequiredValidator not working FireFox

TJS
I am finding that the serverside requiredvalidator doesn't fire in the
firefox browser, and user request proceeds through to my updateProfile
method. Validation is working correctly in the IE browser.

Anyone seen this problem or have any ideas why this might be occurring ??

(I have web.config browsercaps updated from http://slingfive.com/ )

code:
=========
Sub Submit_Click(Sender As Object, e As EventArgs)
If Page.IsValid then Call updateProfile()
End Sub
html:
=========

<asp:Button id="Btn_Submit" onClick="Submit_Click" Runat="Server"
Text="Update"></asp:Button>
Nov 19 '05 #1
3 2067
TJS
Additional info:
===============

In my page, the form is being pre-filled from a database so the user can
review the existing values in their profile.

when using the firefox browser, I have discovered that when the form has
been given a value such as

"phone.text = [value retrieved from db]"

that the retrieved value is what becomes tested by the validator .

My problem is , if the user changes a value, the validator is not testing
the new entry, but is testing what was originally retrieved from the
database.

Has anyone else seen this problem using firefox ?? is there away to
resolve it ??

(The same page works fine in IE, and the new entries are tested)


"TJS" <no****@here.com> wrote in message
news:eJ**************@TK2MSFTNGP12.phx.gbl...
I am finding that the serverside requiredvalidator doesn't fire in the
firefox browser, and user request proceeds through to my updateProfile
method. Validation is working correctly in the IE browser.

Anyone seen this problem or have any ideas why this might be occurring ??

(I have web.config browsercaps updated from http://slingfive.com/ )

code:
=========
Sub Submit_Click(Sender As Object, e As EventArgs)
If Page.IsValid then Call updateProfile()
End Sub
html:
=========

<asp:Button id="Btn_Submit" onClick="Submit_Click" Runat="Server"
Text="Update"></asp:Button>

Nov 19 '05 #2
From your description, I would focus on two things:
1. The code that sets the Text property from the database is running before
you validate. (Makes sense, right?)
The TextBox gets its Text property by looking at
Request.Forms[TextBox.UniqueID] after it gets added to the Page's controls
tree. This is automatic and no feature built into .net will overwrite it.
Only the user's code is allowed to modify the Text property after its added
to the page.
Generally its wise to get the Text property in the post back event handlers
(after Page_Load) because that's when you know its setup. (Post back event
handlers were intended to handle the data sent by the browser with the
assurance the controls have been properly prepared.)
2. What if the TextBox.UniqueID has changed? It will not retrieve the value
passed back from the server. In this case, the ViewState which stored the
original value (from the database) will be in the Text property. The
ViewState is always assigned prior to applying the value from Request.Forms.
How does the UniqueID get changed? Its built upon the ID of the TextBox and
IDs of all naming containers that are its ancestors. For example, if your
textbox is in UserControl "MyUC", UniqueID is "MyUC_:TextBox1". So if any of
the IDs involved are differently, it will cause this problem.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"TJS" <no****@here.com> wrote in message
news:OR**************@TK2MSFTNGP12.phx.gbl...
Additional info:
===============

In my page, the form is being pre-filled from a database so the user can
review the existing values in their profile.

when using the firefox browser, I have discovered that when the form has
been given a value such as

"phone.text = [value retrieved from db]"

that the retrieved value is what becomes tested by the validator .

My problem is , if the user changes a value, the validator is not testing
the new entry, but is testing what was originally retrieved from the
database.

Has anyone else seen this problem using firefox ?? is there away to
resolve it ??

(The same page works fine in IE, and the new entries are tested)


"TJS" <no****@here.com> wrote in message
news:eJ**************@TK2MSFTNGP12.phx.gbl...
I am finding that the serverside requiredvalidator doesn't fire in the
firefox browser, and user request proceeds through to my updateProfile
method. Validation is working correctly in the IE browser.

Anyone seen this problem or have any ideas why this might be occurring ??

(I have web.config browsercaps updated from http://slingfive.com/ )

code:
=========
Sub Submit_Click(Sender As Object, e As EventArgs)
If Page.IsValid then Call updateProfile()
End Sub
html:
=========

<asp:Button id="Btn_Submit" onClick="Submit_Click" Runat="Server"
Text="Update"></asp:Button>


Nov 19 '05 #3
TJS
thanks for replying

I'm not after the textbox value stored in the viewstate, or anywhere else,
I'm trying to validate the user entry in the form. The validation should be
looking at the current form value not at the hidden fields.

I don't believe the id issue is the source of the trouble. The validation
works in IE, but not in firefox, so the problem appears to be .net with
firefox browser and prefilled forms.

"Peter Blum" <PL****@Blum.info> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
From your description, I would focus on two things:
1. The code that sets the Text property from the database is running
before you validate. (Makes sense, right?)
The TextBox gets its Text property by looking at
Request.Forms[TextBox.UniqueID] after it gets added to the Page's controls
tree. This is automatic and no feature built into .net will overwrite it.
Only the user's code is allowed to modify the Text property after its
added to the page.
Generally its wise to get the Text property in the post back event
handlers (after Page_Load) because that's when you know its setup. (Post
back event handlers were intended to handle the data sent by the browser
with the assurance the controls have been properly prepared.)
2. What if the TextBox.UniqueID has changed? It will not retrieve the
value passed back from the server. In this case, the ViewState which
stored the original value (from the database) will be in the Text
property. The ViewState is always assigned prior to applying the value
from Request.Forms.
How does the UniqueID get changed? Its built upon the ID of the TextBox
and IDs of all naming containers that are its ancestors. For example, if
your textbox is in UserControl "MyUC", UniqueID is "MyUC_:TextBox1". So if
any of the IDs involved are differently, it will cause this problem.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"TJS" <no****@here.com> wrote in message
news:OR**************@TK2MSFTNGP12.phx.gbl...
Additional info:
===============

In my page, the form is being pre-filled from a database so the user can
review the existing values in their profile.

when using the firefox browser, I have discovered that when the form has
been given a value such as

"phone.text = [value retrieved from db]"

that the retrieved value is what becomes tested by the validator .

My problem is , if the user changes a value, the validator is not
testing the new entry, but is testing what was originally retrieved from
the database.

Has anyone else seen this problem using firefox ?? is there away to
resolve it ??

(The same page works fine in IE, and the new entries are tested)


"TJS" <no****@here.com> wrote in message
news:eJ**************@TK2MSFTNGP12.phx.gbl...
I am finding that the serverside requiredvalidator doesn't fire in the
firefox browser, and user request proceeds through to my updateProfile
method. Validation is working correctly in the IE browser.

Anyone seen this problem or have any ideas why this might be occurring
??

(I have web.config browsercaps updated from http://slingfive.com/ )

code:
=========
Sub Submit_Click(Sender As Object, e As EventArgs)
If Page.IsValid then Call updateProfile()
End Sub
html:
=========

<asp:Button id="Btn_Submit" onClick="Submit_Click" Runat="Server"
Text="Update"></asp:Button>



Nov 19 '05 #4

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

Similar topics

3
by: SStory | last post by:
Is there no way to require a checkbox to be checked in ASP.NET? The requiredvalidator control doesn't work for it--should I make a server--roundtrip for that and check during the btn_click event? ...
1
by: Elie Medeiros via .NET 247 | last post by:
Hi there, I have written a custom validator function to validate a datefrom a user-filled field. The function tries to parse the dateand if it can't, sets (serverValidateEventArgs)e.IsValid...
7
by: tshad | last post by:
I have the following: <asp:textbox id="ProfileName" columns="45" runat="server" /> <asp:RequiredFieldValidator ControlToValidate="ProfileName" Display="Dynamic" Text="Name Required"...
6
by: Mark Olbert | last post by:
The doPostBack javascript functioning is not submitting the page when called by linkbuttons (or an autopostback checkbox, for that matter). I'm aware of a problem with Netscape browsers and the...
4
by: Shimon Sim | last post by:
hi It should be easy but I can't make it work. I have DropDownList. I set first with text and value "Select". Then I add RequiredValidator and set it InitialValue to "Select" and I expect that the...
2
by: Niraj Sikotara | last post by:
hello, i'm using ASP.NET 2.0, and have placed validators on a page that are not working correctly in FireFox (1.5.0.7) the page can be downloaded from...
1
by: Rotsey | last post by:
Hi, As the subject says I have an application that uses xml at the client to render custom tables to get a drill down effect. So I query my database and create a xml document of it. I then...
1
by: marcarlem | last post by:
Sorry about my english but it´s not my first lenaguage. i got a problem using ftp_get. My FTP server is working properly (I can upload and download files to it) but when I try to download a File...
1
by: Nirmal Vasanth | last post by:
Hi., I am working .NetFramework1.1.i use Asp.net1.1 server validation controls its working IE but not working in Firefox browser. Please give me a solution..
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.