本文整理汇总了VB.NET中System.Web.UI.WebControls.WebParts.GenericWebPart类的典型用法代码示例。如果您正苦于以下问题:VB.NET GenericWebPart类的具体用法?VB.NET GenericWebPart怎么用?VB.NET GenericWebPart使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了GenericWebPart类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1:
' 导入命名空间
Imports System.Data
Imports System.Configuration
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Partial Public Class genericwebpart_sample
Inherits System.Web.UI.Page
Private calendarPart As GenericWebPart
Private listPart As GenericWebPart
Protected Sub Page_Load(ByVal sender As [Object], ByVal e As EventArgs)
calendarPart = WebPartManager1.GetGenericWebPart(Calendar1)
listPart = WebPartManager1.GetGenericWebPart(BulletedList1)
If Not IsPostBack Then
Label2.Text = String.Empty
Label3.Text = String.Empty
End If
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs)
Label2.Text = _
"<h3>Calendar GenericWebPart Properties</h3>" & _
"<em>Title: </em>" & calendarPart.Title & _
"<br />" & _
"<em>CatalogIconImageUrl: </em>" & calendarPart.CatalogIconImageUrl & _
"<br />" & _
"<em>TitleUrl: </em>" & calendarPart.TitleUrl & _
"<br />" & _
"<em>Decription: </em>" & calendarPart.Description & _
"<br />" & _
"<em>TitleIconImageUrl: </em>" & calendarPart.TitleIconImageUrl & _
"<br />" & _
"<em>ChildControl ID: </em>" & calendarPart.ChildControl.ID & _
"<br />" & _
"<em>ChildControl Type: </em>" & calendarPart.ChildControl.GetType().Name & _
"<br />" & _
"<em>GenericWebPart ID: </em>" & calendarPart.ID & _
"<br />" & _
"<em>GenericWebPart Type: </em>" & calendarPart.GetType().Name & _
"<br />" & _
"<em>GenericWebPart Parent ID: </em>" & calendarPart.Parent.ID
Label3.Text = _
"<h3>BulletedList GenericWebPart Properties</h3>" & _
"<em>Title: </em>" & listPart.Title & _
"<br />" & _
"<em>CatalogIconImageUrl: </em>" & listPart.CatalogIconImageUrl & _
"<br />" & _
"<em>TitleUrl: </em>" & listPart.TitleUrl & _
"<br />" & _
"<em>Decription: </em>" & listPart.Description & _
"<br />" & _
"<em>TitleIconImageUrl: </em>" & listPart.TitleIconImageUrl & _
"<br />" & _
"<em>ChildControl ID: </em>" & listPart.ChildControl.ID & _
"<br />" & _
"<em>ChildControl Type: </em>" & listPart.ChildControl.GetType().Name & _
"<br />" & _
"<em>GenericWebPart ID: </em>" & listPart.ID & _
"<br />" & _
"<em>GenericWebPart Type: </em>" & listPart.GetType().Name & _
"<br />" & _
"<em>GenericWebPart Parent ID: </em>" & listPart.Parent.ID
End Sub
End Class