|
Wersja 752, 0.8 KB
(wprowadzona przez marek, 17 years temu)
|
|
wiersz
|
| Line | |
|---|
| 1 | using System.Web;
|
|---|
| 2 | using System.Web.Mvc;
|
|---|
| 3 | using System.Web.UI;
|
|---|
| 4 |
|
|---|
| 5 | namespace Wyceny
|
|---|
| 6 | {
|
|---|
| 7 | public partial class _Default : Page
|
|---|
| 8 | {
|
|---|
| 9 | public void Page_Load(object sender, System.EventArgs e)
|
|---|
| 10 | {
|
|---|
| 11 | // Change the current path so that the Routing handler can correctly interpret
|
|---|
| 12 | // the request, then restore the original path so that the OutputCache module
|
|---|
| 13 | // can correctly process the response (if caching is enabled).
|
|---|
| 14 |
|
|---|
| 15 | string originalPath = Request.Path;
|
|---|
| 16 | HttpContext.Current.RewritePath(Request.ApplicationPath, false);
|
|---|
| 17 | IHttpHandler httpHandler = new MvcHttpHandler();
|
|---|
| 18 | httpHandler.ProcessRequest(HttpContext.Current);
|
|---|
| 19 | HttpContext.Current.RewritePath(originalPath, false);
|
|---|
| 20 | }
|
|---|
| 21 | }
|
|---|
| 22 | }
|
|---|
Notatka: Zobacz
TracBrowser
aby uzyskać więcej informacji.