IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 1 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New I don't get it (well, I do but,,,)
ASP.Net is designed around the idea of pages posting back to themselves. You actually have to go out of your way to do otherwise.

The difficulty in your situation is if you want to modify those search parameters in the QueryString for each new search. ASP.Net wants to treat a URL with a different QueryString like a new request for the page instead of a postback to the same one (in which case it would preserve and rebuild the state of the page and the event to call server-side in hidden VIEWSTATE form variables), so it doesn't let you just modify the QueryString and postback. You have to instead go through the trouble of rebuilding the QueryString yourself and calling Response.Redirect().
New Yep, it's a hack
I'm sure there is a more ASP.NET style solution that involves reworking the connection object and moving the data pull into it's own subroutine that can be called from both the Page_load and button click event.

Honestly though, even when I was coding ASP.NET, I went out of my way to minimize the use of it's event cycle. It's just adding a layer of obscurement to the web event cycle and exists only to try and make ASP.NET and windows forms have a similar event loop. Which doesn't archive anything, good form coding and good web coding still remain vastly different, because the bottlenecks are in different places and the platform fundamentally different.

Jay
New Re: Yep, it's a hack
I do think there's a misunderstanding by Lincoln of the magic ASP.net is doing behind the scenes here. It's understandable given his desktop VB background. I came at ASP.Net after doing plain old HTML form processing with Perl and CGI, so I knew there had to be something keeping state for me and rebuilding object trees server side and routing "events" via hidden form variables.

But it's definitely geared towards "application" style design rather than "website" design.

PS: The ASP.Net style design would have been to ditch the StartSearch.aspx page and just have a single Search.aspx page that only enables the results grid and does the DB work if there is content in the search textbox.
Expand Edited by altmann March 13, 2009, 01:08:02 AM EDT
     handling a recursive ASP.Net web page - (lincoln) - (10)
         sudo apt-get install php __________ :-P -NT - (drook) - (1)
             Not unless you plan - (lincoln)
         Some random ideas. - (Another Scott)
         Re: handling a recursive ASP.Net web page - (altmann)
         can you reuse the module for the original search? - (boxley)
         Re: handling a recursive ASP.Net web page - (jay) - (4)
             That's what I wanted - (lincoln) - (3)
                 I don't get it (well, I do but,,,) - (altmann) - (2)
                     Yep, it's a hack - (jay) - (1)
                         Re: Yep, it's a hack - (altmann)

That's right subspace ponies! I'm makin' gravy without the lumps!
48 ms