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

MigratingfromASP.NET1.xtoASP.NET2.0

来源:http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/10/12
eamlined process, while still providing the flexibility and extensibility that developers were used to with ASP.NET 1.x.

The Provider Model

many of the new features in ASP.NET 2.0 depend on communication between the Web application and a data store. In order to provide this access in a consistent fashion, ASP.NET 2.0 uses a set of providers. A provider is both a pattern and a point where developers can extend the ASP.NET 2.0 framework to meet specific data-store needs. For example, a developer can create a new provider to support the user identification system, or to store personalization data in an alternate data store.

most custom providers will interact with database backend systems. However, the programmer is free to implement the required provider methods and classes using any medium or algorithm, so long as it meets the model''s required interface specification.

ASP.NET 2.0 Providers

the provider model defines a set of interfaces and hooks into the data persistence layer that provides storage and retrieval for specified requests. In this way the provider model acts as a programming specification that allows ASP.NET 2.0 to service unique client concerns.

asp.net 2.0 uses a wide variety of providers, including:

  • membership. The membership provider supports user authentication and user management.
  • profile. The profile provider supports storage and retrieval of user-specific data linked to a profile.
  • personalization. The personalization provider supports persistence of Web Part configurations and layouts for each user.
  • site Navigation. The site navigation provider maps the physical storage locations of ASP.NET pages with a logical model that can be used for in-site navigation and linked to the various new navigation controls.
  • data providers. ADO.NET has always used a provider model to facilitate the connection between a database and the ADO.NET API. ASP.NET 2.0 builds upon the data provider by encapsulating many of the ADO.NET data calls in a new object called a data source.

each type of provider acts independently of the other providers. You can therefore replace the profile provider without causing problems with the membership provider.

in the second section of this paper, you will find specific examples of how providers are used with several of the new ASP.NET 2.0 features.

The ASP.NET 2.0 Coding Model

in ASP.NET 1.x, you could develop an ASP.NET page in one of two ways. First, you could put your code directly inline with your ASP.NET tags. The code inline model is very similar to the coding model that was prevalent with classical ASP and other scripting languages. However, the code inline model has several problems, such as the intermixing of code and HTML. ASP.NET 1.0 introduced the code-behind model as a replacement. The code-behind model used an external class to house the code, while the ASPX page contained the HTML and ASP.NET tags. The code-behind model thus successfully separated code from content; however, it created some interesting inheri

网学推荐

免费论文

原创论文

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