
2 different event responses to one Click event?
Just before leaving work Friday afternoon, the boss tried out my code. He liked it generally speaking, but he didn't like that the Research button, when clicked with nothing in the Search textbox on the SearchResults page, puts up a message box before reloading the page. He said that it looked like it was going to a separate page to display the error message then returning to the SearchResults page.
He wants it so that the page initially loads loads, you don't enter anything into the textbox, click Research, and have a Javascript alert message box displayed. But, if the user put something in the textbox, go to the VB.Net code behind, retrieve data from the SQL table and reload the page with the new data populating the grid.
Can this be done? If so, how?
"Chicago to my mind was the only place to be. ... I above all liked the city because it was filled with people all a-bustle, and the clatter of hooves and carriages, and with delivery wagons and drays and peddlers and the boom and clank of freight trains. And when those black clouds came sailing in from the west, pouring thunderstorms upon us so that you couldn't hear the cries or curses of humankind, I liked that best of all. Chicago could stand up to the worst God had to offer. I understood why it was built--a place for trade, of course, with railroads and ships and so on, but mostly to give all of us a magnitude of defiance that is not provided by one house on the plains. And the plains is where those storms come from."
-- E.L. Doctorow