为ASP.NET控件添加设计时支持(11)

发表于:2007-06-30来源:作者:点击数: 标签:
列表 3:BlogClient.ASPx. VB Imports BlogControl Public Class WebForm1 Inherits System.Web.UI.Page Protected WithEvents Link1 As _ System.Web.UI.WebControls.HyPerlink Protected WithEvents Link2 As _ System.Web.UI.WebControls.HyperLink Prote
     列表 3:BlogClient.ASPx.VB
  
  Imports BlogControl
  
  Public Class WebForm1
  Inherits System.Web.UI.Page
  Protected WithEvents Link1 As _
  System.Web.UI.WebControls.HyPerlink
  Protected WithEvents Link2 As _
  System.Web.UI.WebControls.HyperLink
  Protected WithEvents Blog1 As BlogControl.Blog
  
  Private Sub Page_Load(ByVal sender As System.Object, _
  ByVal e As System.EventArgs) Handles MyBase.Load
  If Request.QueryString("mode") = "add" Then
  Blog1.Mode = "Add"
  Link1.Visible = False
  Link2.Visible = False
  Else
  Blog1.Mode = "Display"
  Link1.Visible = True
  Link2.Visible = True
  End If
  End Sub
  
  End Class
  

原文转自:http://www.ltesting.net