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

📄 fragment.ascx

📁 This is a book about vb.you could learn this from this book
💻 ASCX
字号:
<%@ Language="VB" %>
<%@ OutputCache Duration="10" VaryByControl="Category"%>

<Script runat="server">

  Public Sub Button_Click(sender As Object, e As EventArgs)
  
    If Category.Value = "" Then
    
      Response.Cache.SetNoServerCaching()
      CategoryItem.InnerHtml = "Not cached..."
    
    Else
      CategoryItem.InnerHtml = "You selected: <font color=red>" & Category.Value & "</font>"
    End If
    
  End Sub

  Public Sub Page_Load()
  
    ' Get the Date and Time, once again this should not change after the first run       
    Dim NowTime As DateTime = DateTime.Now
    Dim Expires As DateTime = NowTime.AddSeconds(10)

    CreatedStamp.InnerHtml = NowTime.ToString("r")
    ExpiresStamp.InnerHtml = Expires.ToString("r")
  
  End Sub
  
</Script>

<form method="post" runat="server">
      Category:  <select id="Category" size=1 runat=server>
                  <option value=""><!--Select Category--></option>
                  <option>psychology</option>
                  <option>business</option>
                  <option value="Popular Computer">popular_comp</option>
                 </select>
            <input type=submit value="Lookup" OnServerClick="Button_Click" runat=server>

<Font size="6">
<B id="CategoryItem" runat="server"></B> 
<P>
Fragment Cache created: <Font color="red"><B id="CreatedStamp" runat="server"></B></Font>
<BR>
Fragment Cache expires: <Font color="red"><B id="ExpiresStamp" runat="server"></B></Font>
</Font>

</form>


⌨️ 快捷键说明

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