惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
P
Privacy International News Feed
P
Proofpoint News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
C
CXSECURITY Database RSS Feed - CXSecurity.com
Know Your Adversary
Know Your Adversary
Security Latest
Security Latest
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Attack and Defense Labs
Attack and Defense Labs
NISL@THU
NISL@THU
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
GbyAI
GbyAI
N
News and Events Feed by Topic
N
News | PayPal Newsroom
Y
Y Combinator Blog
C
CERT Recently Published Vulnerability Notes
N
Netflix TechBlog - Medium
S
Security Affairs
Spread Privacy
Spread Privacy
罗磊的独立博客
腾讯CDC
MyScale Blog
MyScale Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
L
LINUX DO - 热门话题
The Cloudflare Blog
L
LangChain Blog
博客园_首页
H
Hacker News: Front Page
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
博客园 - 聂微东
SecWiki News
SecWiki News
A
Arctic Wolf
爱范儿
爱范儿
Google Online Security Blog
Google Online Security Blog
T
Threat Research - Cisco Blogs
Hacker News - Newest:
Hacker News - Newest: "LLM"
有赞技术团队
有赞技术团队
The GitHub Blog
The GitHub Blog
Cyberwarzone
Cyberwarzone
博客园 - 叶小钗
V
Visual Studio Blog
V
V2EX
T
Tailwind CSS Blog
Project Zero
Project Zero
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
MongoDB | Blog
MongoDB | Blog
D
Docker

博客园 - zqf620

.Net PetShop 3.0中购物车总价计算的bug .NET PetShop 3.0 FAQ novalidate选项无效的问题 .NET方向高级开发人员面试时应该事先考虑的问题 (zt) UML中的图 从一组数中每次抽取出一个数,并规定了每个数出现的概率 从一个表中随即抽取100条记录 PL/SQL User's Guide and Reference, Release 2 (9.2) chm版 下载 Oracle中实现自动增长列 在开发过程中运用UML 输出到html页面的字符串的格式化 在DataGrid控件中编辑数据项 在DataGrid控件中获取数据项中各列的数据内容 DataGrid控件的分页 DTD简介 W3C XML Schema (XSD) XML相关技术概览 access作为后台数据库遇到的访问权限问题 HTML实体
将web窗体页文件(test.aspx)转换成用户控件文件(test.ascx)
zqf620 · 2007-01-20 · via 博客园 - zqf620

修改web窗体页面文件:
1)删除web窗体页文件中的HTML标记:<HTML>、<body>、<head>、<form>
  之所以要删除这些标记,是因为在一个html文件中不能两次出现这些标记(用户控件总是要放到其它页面中的)。

2)将web窗体页文件改后缀名,比如:从test.aspx改为test.ascx。
  在vs.net2003中重命名web窗体页文件,也会导致其后台代码文件改名。
  比如test.aspx.cs会自动改名为test.ascx.cs

3)修改<%Page .... %>为<%@ Control .... %>
  在这里只需要将Codebehind属性的值从test.aspx.cs改为test.ascx.cs

4)修改后台代码文件-test.ascx.cs
  将其父类从System.Web.UI.Page改为System.Web.UI.UserControl

5)修改ok


使用用户控件:
  从"解决方案资源管理器"中,将用户控件文件test.ascx拖动到你的web窗体页上