Corona中文站

强大、易学的跨平台(iOS/Android)开发框架。QQ群1:74390406(满) 群2:221929599

导航

ASP.NET使用Global.asax轻松实现URL重写
在ASP.NET中实现URLRewrite有很多方法,今天介绍比较简单的一种,就是利用Global.asax来实现的。
很简单,在项目中新建一个全局应用程序类,即Global.asax,如下图:

在Global.asax文件中添加如下代码:
void Application_BeginRequest(object sender, EventArgs e)
{
HttpContext context = HttpContext.Current;
...
«1»

日历

<< 2014-10 >>

Sun

Mon

Tue

Wed

Thu

Fri

Sat

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

最近发表

Copyright 2011-2015 BuildApp.Net. All Rights Reserved.