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

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
Forbes - Security
Forbes - Security
WordPress大学
WordPress大学
P
Proofpoint News Feed
T
Threat Research - Cisco Blogs
L
LINUX DO - 热门话题
L
Lohrmann on Cybersecurity
Spread Privacy
Spread Privacy
D
Darknet – Hacking Tools, Hacker News & Cyber Security
大猫的无限游戏
大猫的无限游戏
博客园 - 三生石上(FineUI控件)
P
Privacy International News Feed
A
About on SuperTechFans
T
Tailwind CSS Blog
I
InfoQ
S
Securelist
云风的 BLOG
云风的 BLOG
罗磊的独立博客
Recent Announcements
Recent Announcements
T
The Exploit Database - CXSecurity.com
B
Blog RSS Feed
V
Visual Studio Blog
Know Your Adversary
Know Your Adversary
The GitHub Blog
The GitHub Blog
Jina AI
Jina AI
腾讯CDC
Cyberwarzone
Cyberwarzone
有赞技术团队
有赞技术团队
AWS News Blog
AWS News Blog
博客园 - 【当耐特】
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
F
Full Disclosure
S
Secure Thoughts
博客园 - 司徒正美
J
Java Code Geeks
Y
Y Combinator Blog
Google Online Security Blog
Google Online Security Blog
GbyAI
GbyAI
N
News and Events Feed by Topic
Help Net Security
Help Net Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Project Zero
Project Zero
T
Tenable Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Tor Project blog
MyScale Blog
MyScale Blog
Scott Helme
Scott Helme
小众软件
小众软件
K
Kaspersky official blog

博客园 - 飞鼠

面试时英语自我介绍范文 判斷一天是否是年月中正確的日 - 飞鼠 - 博客园 Javascript中parseInt的一個問題 NUMERIC(3,1) 的含義 在 google 里找书下载的捷径 - 飞鼠 使用asp.net发送邮件详解 SQL密码 不斷提醒 datagrid用xml作为数据源,并且有更新,删除和排序的操作(VB) - 飞鼠 - 博客园 将xml作为DataGrid 操作(Sort, Edit, Delete) - 飞鼠 用ASP.NET结合XML制作广告管理程序 用ASP.NET结合XML制作广告管理程序(2) - 飞鼠 - 博客园 XML、DataSet、DataGrid结合写成广告管理程序(下)(转载) - 飞鼠 - 博客园 XML、DataSet、DataGrid结合写成广告管理程序(上)(转载) 分别用DataGrid、Repeater、DataList绑定XML数据的例子 - 飞鼠 - 博客园 将某一目录下的所有相同格式的 XML文件绑定到不同的DataGrid - 飞鼠 - 博客园 创建可编辑的xml文档(之五)执行中的treeview 控件 创建可编辑的xml文档(之四) 删除、改名、插入操作 创建可编辑的xml文档(之三)执行拖放操作
創建用戶控件 - 飞鼠 - 博客园
飞鼠 · 2006-01-12 · via 博客园 - 飞鼠

用戶控件

<% @ Control ClassName="Hello" %>
<script language="vb" runat="server">
Private _name As String
Public Property Name As String
Get
    Return _name
End Get
Set
    _name
=Value
End Set
End Property
Public Sub SayHello()
Label1.Text
="Hello," & _name & "!"
End Sub
</Script>
<asp:Label id=Label1 runat="server"></asp:Label>

Web頁面

<% @ Page Language="vb" %>
'以聲明方式添加用戶控件
<% @ Register TagPrefix="aspnetsbs" TagName="Hello" Src="Hello.ascx" %>
<html>
<head>
<script runat="server">
Sub Page_Load(Sender As Object,E As EventArgs)
MyHello.Name
="HURENFEI"
MyHello.SayHello
End Sub
</script>
</head>
<body>
<aspnetsbs:Hello id="MyHello" runat="server"/>
</body>
</html>

<% @ Page Language="vb" %>
'以編程方式添加用戶控件
<% @ Reference Control="Hello.ascx" %>
<html>
<head>
<script runat="server">
Sub Page_Load(Sender As Object,E As EventArgs)
Dim MyHello As Control
=LoadControl("Hello.ascx")
HelloHolder.Controls.Add(MyHello)
CType(MyHello,Hello).Name 
="HuRenfei"
CType(MyHello,Hello).SayHello
End Sub
</script>
</head>
<body>
<asp:placeholder id="HelloHolder" runat="server"/>
</body>
</html>


<% @ Control ClassName="Hello" %>