I'm building my first little application in .net (C# - framework 3.5).
So far, I've built a search page where the user enters values into text boxes, clicks a button and it displays a grid of results. I'm using an updatepanel to prevent full postbacks. All ok so far!
When the user changes a value in one of the text boxes, I'm using the OnTextChanged event to hide the grid panel until they hit the button to view.
It sort of works, but when the user clicks the button, the OnTextChanged event fires and the button does nothing, so a second click is required.
In an ideal world, what I'd like is for the client side OnKeyPress event to hide the panel as soon as the user starts typing. I found a code example that will perform a postback from Javascript, the problem is that it took focus away from the textbox.
Any ideas? Go easy I'm new to .net!
So far, I've built a search page where the user enters values into text boxes, clicks a button and it displays a grid of results. I'm using an updatepanel to prevent full postbacks. All ok so far!
When the user changes a value in one of the text boxes, I'm using the OnTextChanged event to hide the grid panel until they hit the button to view.
It sort of works, but when the user clicks the button, the OnTextChanged event fires and the button does nothing, so a second click is required.
In an ideal world, what I'd like is for the client side OnKeyPress event to hide the panel as soon as the user starts typing. I found a code example that will perform a postback from Javascript, the problem is that it took focus away from the textbox.
Any ideas? Go easy I'm new to .net!
Comment