How the get the Page Object in a Dll

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am designing an ASP.Net webpage.
Becasuse i have some business logic in a DLL i want have the ability to set
an Response.Redirect from within the Dll.
How can i Hook on the Page object from initializeing page in the Dll.
Regards,
Rene
 
I am not sure if you need a reference to the page object.

You can set a reference to System.Web and the use the HttpContext.Current.

System.Web.HttpContext.Current.Response.Redirect("Default.asp", false);
 
Hi Jed,
Thnx. This solves my prob.
Regards,
Rene

Jed said:
I am not sure if you need a reference to the page object.

You can set a reference to System.Web and the use the HttpContext.Current.

System.Web.HttpContext.Current.Response.Redirect("Default.asp", false);
 
It's a bad idea to couple your middle layer (DLLs n stuff) to the front
end. I would use delegates to create a lightweight tunnel to the front
end.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top