Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Page appears to fail validation even though it has no validation controls

Reply
Thread Tools

Page appears to fail validation even though it has no validation controls

 
 
=?Utf-8?B?ZGh1cndpdHo=?=
Guest
Posts: n/a
 
      04-09-2004
Hi

I have developed a web app with a dozen or so pages, which allows searching for and editing orders by OrderID. There is a search page for entering multiple search criteria. In addition, each page has a nav bar (actually a user control) along the side which also has a textbox for entering an OrderID, allowing simple searches from any page in the app. This navbar search textbox has a button associated with it which is disabled until the user enters a search value, at which point it becomes enabled. The user can either click the button or press Enter (since the button has focus) and the search commences

The problem is that on one of the pages, pressing Enter disables the search button but does not do the search, although you can click the button and the search performs correctly. It is behaving as though there is a validation failure on the page, because the page is never getting posted back to the server, i.e. the button click event handler is not getting called. I have verified that there are in fact no validation controls on the errant page

After setting ValidateRequest to false in the @Page directive, everything worked correctly. However, I do not want to leave that attribute set, due to the security implications

So the questions are
1. Why is the one page behaving this way when none of the other pages are
2. Why does ValidateRequest fix the problem
3. How can I make the page work correctly without setting ValidateRequest

Thanks

Dan Hurwitz

 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      04-10-2004
Hi,

this has nothing to do with validation controls. I don't know why it would
work when ValidateRequest is false (ValidateRequest impacts ASP.NET checking
if malicious HTML inputs like script and such are trying to be injected).
Anyway,pressing Enter in TextBox is known problem, it is IE related. Andy
Smith has written a control to overcome this problem (which is tried to be
fixed in ASp.NEt v2 as well. IIRC).

http://www.metabuilders.com/Tools/DefaultButtons.aspx

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke


"dhurwitz" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
Hi,

I have developed a web app with a dozen or so pages, which allows searching
for and editing orders by OrderID. There is a search page for entering
multiple search criteria. In addition, each page has a nav bar (actually a
user control) along the side which also has a textbox for entering an
OrderID, allowing simple searches from any page in the app. This navbar
search textbox has a button associated with it which is disabled until the
user enters a search value, at which point it becomes enabled. The user can
either click the button or press Enter (since the button has focus) and the
search commences.

The problem is that on one of the pages, pressing Enter disables the search
button but does not do the search, although you can click the button and the
search performs correctly. It is behaving as though there is a validation
failure on the page, because the page is never getting posted back to the
server, i.e. the button click event handler is not getting called. I have
verified that there are in fact no validation controls on the errant page.

After setting ValidateRequest to false in the @Page directive, everything
worked correctly. However, I do not want to leave that attribute set, due
to the security implications.

So the questions are:
1. Why is the one page behaving this way when none of the other pages are?
2. Why does ValidateRequest fix the problem?
3. How can I make the page work correctly without setting ValidateRequest?

Thanks.

Dan Hurwitz


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU Usage frequently 100% even though it seems not even close tototal memory Newcomer Computer Support 3 11-15-2009 06:51 AM
CPU Usage frequently 100% even though it seems not even close tototal memory Newcomer Computer Support 0 11-14-2009 11:21 PM
Undefined subroutine even though it appears in symbol table? max.gruber Perl Misc 4 01-28-2007 04:32 AM
Windows logon dialog appears even though authentication mode is set to None?!? Joergen Bech ASP .Net 2 07-02-2005 03:47 PM
Calling parent's method even though it has been overridden in the child Patel Java 6 10-23-2003 03:08 PM



Advertisments