472,958 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 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 2050
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 its 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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.