Front Controller working version

  • Thread starter Thread starter Matt
  • Start date Start date
M

Matt

Can someone please provide me working version of front controller
framework so i can start project.

Any link would be great. the one on microsoft site is complecated
 
Can some pls tell me how can i pass the url on base page the handle
what is the syntax.
aspx page
public class Main : Handler.BasePage
{

protected override void PageLoadEvent(object sender, System.EventArgs
e)
{

}
}

MyBase class

public class BasePage : Page
{
virtual protected void PageLoadEvent(object sender, System.EventArgs
e)
{}
protected void Page_Load(object sender, System.EventArgs e)
{
if(!IsPostBack)
{
what is the sysntax
PageLoadEvent(sender, e);
}
}
}

handler class
public void ProcessRequest(HttpContext context)
{
handler.ProcessRequest(context);
}
 
Hello Matt,

Do you mean Request.Url?

You can access that in your derived class without passing it because of the
wonders of inheritance. :)
 
Thanks matt
But I am not sure
On Aspx.cs file i inherit BasePage CS to handel Page_Load and when
page_load executes, just would like to ref handler to find out the url.
so i have to do something in basepage.cs to get handler to get me the
page

just want to find out what i am suppose to write in basePage void
page_load method.
handler.ProcessRequest(context­); works fine. i just have to give this
guy or pass him the page that i want i think.

thanks
 
Hello Matt,

Implementing Front Controller can be quite difficult with just a q/a session.
The patterns and practices group has an article [1] that talks about this.
Why dont you review this and see if it helps with some of these questions.
Once you've reviewed that and tried the suggestions in there, if you're still
stuck, let me know. Id be glad to help you from there.

[1] http://msdn.microsoft.com/library/d...s/dnpatterns/html/ImpFrontControllerInASP.asp
 
Back
Top