G
Guest
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
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