notification for your website
Assume you want to do some upgrades to your website, or you changed your domain and want a notification or …
What you need to do is write a “Dear visitor … bla bla” text and show it on all pages in your website. One of the easiest solutions id to use global.asax. all you need is make page and put all information you want . then use Application_BeginRequest of global.asax to redirect all requests to your page . and you must remember prevent to redirect your page to itself , so you wont get stuck in an infinite loop.
protected void Application_BeginRequest(object sender, EventArgs e)
{
string upgradingUrl = "/Page.aspx";
if (String.Compare(Request.Path, upgradingUrl) != 0)
Response.Redirect(upgradingUrl);
}
by : Hossein Rooznamechi - on : 4/15/2007 - Visits : 403
|
result of survey |
|
0 |
 |
 |
0 |
[send Your Comment]
[send Your Comment]