⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simple-single-binding.aspx

📁 This is a book about vb.you could learn this from this book
💻 ASPX
字号:
<%@Page Language="VB"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head>
<title>Simple Single-Value Data Binding</title>
<style type="text/css">
body, td {font-family:Tahoma,Arial,sans-serif; font-size:10pt}
input {font-family:Tahoma,Arial,sans-serif; font-size:9pt}
.heading {font-family:Tahoma,Arial,sans-serif; font-size:14pt; font-weight:bold}
.subhead {font-family:Tahoma,Arial,sans-serif; font-size:12pt; font-weight:bold; padding-bottom:5px}
.cite {font-family:Tahoma,Arial,sans-serif; font-size:8pt}
</style></head>
<body bgcolor="#ffffff">
<span class="heading">Simple Single-Value Data Binding</span><hr />
<!--------------------------------------------------------------------------->

<form runat="server">

<table border="0">
<tr><td nowrap="nowrap">


<b>&lt;ASP:Label&gt;</b> control:
<ASP:Label Text="<%# ImageURL %>" runat="server" /><p />

<b>&lt;ASP:TextBox&gt;</b> control:
<ASP:TextBox Text="<%# ImageURL %>" runat="server" /><p />

<b>&lt;ASP:Button&gt;</b> control:
<ASP:Button Text="<%# ImageURL %>" runat="server" /><p />

<b>&lt;ASP:LinkButton&gt;</b> control:
<ASP:LinkButton Text="<%# ImageURL %>" runat="server" /><p />

<b>&lt;ASP:Image&gt;</b> control:
<ASP:Image Src="<%# ImageURL %>" ImageAlign="middle" runat="server" /><p />

<b>&lt;ASP:CheckBox&gt;</b> control:
<ASP:CheckBox Text="<%# ImageURL %>" runat="server" /><p />

<b>&lt;ASP:RadioButton&gt;</b> control:
<ASP:RadioButton Text="<%# ImageURL %>" runat="server" /><p />

<b>&lt;ASP:Hyperlink&gt;</b> control:
<ASP:Hyperlink Text="<%# ImageURL %>" NavigateUrl="<%# ImageURL %>" runat="server" /><p />

<b>&lt;ASP:ImageButton&gt;</b> control:
<ASP:ImageButton ImageUrl="<%# ImageURL %>" runat="server" />


</td><td nowrap="nowrap">&nbsp; &nbsp; &nbsp;</td><td nowrap="nowrap">


HTML <b>&lt;span&gt;</b> element:
<span><%# ImageURL %></span><p />

HTML <b>&lt;input type="text"&gt;</b> element:
<input type="text" value="<%# ImageURL %>" /><p />

HTML <b>&lt;input type="submit"&gt;</b> element:
<input type="submit" value="<%# ImageURL %>" /><p />

HTML <b>&lt;button&gt;</b> element:
<button><%# ImageURL %></button><p />

HTML <b>&lt;img&gt;</b> element:
<img src="<%# ImageURL %>" align="middle" /><p />

HTML <b>&lt;input type="checkbox"&gt;</b> element:
<input type="checkbox" /><%# ImageURL %><p />

HTML <b>&lt;input type="radio"&gt;</b> element:
<input type="radio" /><%# ImageURL %><p />

HTML <b>&lt;a&gt;</b> element:
<a href="<%# ImageURL %>"><%# ImageURL %></a><p />

HTML <b>&lt;button&gt;</b> and <b>&lt;img&gt;</b> elements:
<button><img src="<%# ImageURL %>"></button>


</td></tr>
</table>

</form>

<!--------------------------------------------------------------------------->

<script language="vb" runat="server">

ReadOnly Property ImageURL() As String
   'declare a read-only property for the Page
   Get
       Return "myimage.gif"
   End Get
End Property

Sub Page_Load()
   'bind all the controls on the page
   Page.DataBind()
End Sub

</script>

<!--------------------------------------------------------------------------->
<!-- #include file="..\global\foot.inc" -->
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -