网站导航免费论文 原创论文 论文搜索 原创论文 网学软件 学术大家 资料中心 会员中心 问题解答 原创论文 大学论文导航 设计下载 最新论文 下载排行 原创论文 论文源代码
返回网学首页
网学联系
最新论文 推荐专题 热门论文 素材专题
当前位置: 网学 > 编程文档 > ASP.net > 正文

MigratingfromASP.NET1.xtoASP.NET2.0

来源:http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/10/12
Args e) { Label1.Text = "Hello ASP.NET 2.0"; } }}

as you can see, the new code-behind file is much cleaner and easier to read. The code-behind file has automatic access to any controls added to the ASP.NET page, and Visual Studio 2005 will provide automatic IntelliSense support and synchronization. Visual Studio also recognizes when you are using a code-behind file, and opens the file rather than the code view when you double-click on a control to access its events.

The /Code directory

the final major change to the coding model is a direct response to a common problem in ASP.NET. Most Web applications require one or more support classes. In ASP.NET, the preferred method was to create a separate project for support classes and then add a reference to the support project within your Web application. Even if you didn''t create a separate project, you still had to create a reference to whatever namespace you used within your own application. Although having a separate project made sense for larger and more complicated applications, it was often painful for developers who only needed one or two simple classes.

asp.net 2.0 introduces a new way of adding support code. The /code directory is a special directory that is automatically compiled and referenced by your ASP.NET application. That is, any classes you place inside the /code directory are automatically accessible from any ASPX page in your application. Visual Studio 2005 and the ASP.NET compiler both automatically create an assembly from these classes and place a reference to the assembly in your Web application.

Configuration and Site Maintenance

one of the more difficult challenges as an ASP.NET developer was properly configuring the web.config file. In ASP.NET 2.0 and Visual Studio 2005, you now have several new features to help you with this task.

IntelliSense in web.config

first, Visual Studio''s IntelliSense feature has now been extended to any XML file that has a valid schema. In the case of the web.config file, this means that you get full IntelliSense support whenever you edit the web.config file from within Visual Studio.

figure 4. IntelliSense on web.config

intellisense helps reduce the chance of misconfigured files. However, ASP.NET 2.0 also includes a new administrative Web site and a Microsoft Management Console to make things even easier.

Administrative Web site

to simplify the process of managing users, ASP.NET 2.0 provides a built in Web site configuration tool. The Web Site Administration Tool is a simple Web site that can only be accessed through a secure connection, or directly on the local host. Through this tool, an administrator can manage the application by configuring services such as user management, the personalization providers, security, and profiles. The tool also allows you to easily configure counters, debugging, and tracing information for your application.

Click here for larger image.

figure 5. Web site administration tool

Microsoft Management Console Snap-In

asp.net 2.0 deploys a special Micro

网学推荐

免费论文

原创论文

设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved 湘ICP备09003080号