Last post Nov 25, 2009 04:34 PM by XIII
Nov 25, 2009 12:09 PM|bhshah77|LINK
I would like to help on creating the real life example on using the IHTTPHandler, where on submitting the form from (page1.aspx), the Handler (implement HTTPHandler) should receive and process the request and transfer user to the Page2.aspx.
And the same Handler should process the request and transfer/redirect usert to the Page3.aspx on submitting the form from the Page2.aspx.
When I tried, the Handler receives and process the request on submitting the form from page1.aspx and on redirecting/transfering user to page2.aspx the control comes back to the Handler and control never comes out of the Handler.
I would like to implement the front controller pattern in my application and I'm very new to ASP.NET.
Thanks in advance.
Nov 25, 2009 12:21 PM|XIII|LINK
check out this article:
Implementing Front Controller in ASP.NET Using HTTPHandler.
Nov 25, 2009 02:26 PM|bhshah77|LINK
Thanks Kris for the reply.
I've visited this site and implemented the FrontController pattern based on the direction given in the URL.
1) user submits the form from (Page1.aspx)
2) Control goes to the Handler class and it process the request
3) Than using the Transfer/Redirect change the browser pager from Page1.aspx to Page2.aspx.
The problem that I'm facing are:
Everything works fine upto step2, but on transfering/redirecting the user to Page2.aspx the control comes back to the Handler and does the same thing again and again.
Another problem I'm getting is If I used transfer method to change the browser page, it is not updating the URL address on the browser.
And If I use Redirect and it does not pass the request object to the new page.
I really need help since I'm very new to ASP.Net development.
Thanks in Advance.
Nov 25, 2009 02:36 PM|XIII|LINK
If I used transfer method to change the browser page, it is not updating the URL address on the browser.
That's completely normal. Server.Transfer redirects on the server, renders that page and emits the rendered html to the browser but doesn't update the address bar of it. If you want that to happen use
Nov 25, 2009 03:07 PM|bhshah77|LINK
But since most of these redirects are on the same server, is it possible to pass the same request object (submitted with the form) to the URL used inside the Response.Redirect?
Nov 25, 2009 03:17 PM|XIII|LINK
is it possible to pass the same request object (submitted with the form) to the URL used inside the Response.Redirect?
Sorry, I didn't really get what you mean by this. Do you mean that you want to pass the same form data (like filled in in textboxes) again?
Nov 25, 2009 03:50 PM|bhshah77|LINK
When the form is submitted from the page1.aspx, the handler does the business process and gets the data that needs to display on the page2.aspx.
Currently since I'm using Response.Redirect, the page2.aspx displays the data from the session instead of request object.
Nov 25, 2009 04:34 PM|XIII|LINK
did you already check out the
PostBackUrl property of the button control to do that?