473,387 Members | 1,585 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,387 software developers and data experts.

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

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

Nov 18 '05 #1
2 1744
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" <an*******@discussions.microsoft.com> wrote in message
news:5A**********************************@microsof t.com...
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
Nov 18 '05 #2
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" <an*******@discussions.microsoft.com> wrote in message
news:5A**********************************@microsof t.com...
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
Nov 18 '05 #3

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

Similar topics

0
by: Matthias Lohrer | last post by:
Hi, I'm playing around with the possibilities of Page.ParseControl. Thanks to Kirk Allen Evans I got my example running (Posting Juli, 17, "Re: Generating ASP.NET-Controls with XSLT...
1
by: dhurwitz | last post by:
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...
1
by: dhurwitz | last post by:
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...
0
by: dhurwitz | last post by:
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...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.