本文整理汇总了VB.NET中System.Web.UI.Control.IsLiteralContent方法的典型用法代码示例。如果您正苦于以下问题:VB.NET Control.IsLiteralContent方法的具体用法?VB.NET Control.IsLiteralContent怎么用?VB.NET Control.IsLiteralContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.UI.Control
的用法示例。
在下文中一共展示了Control.IsLiteralContent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: OnLoad
' Override the OnLoad method to check if the
' page that uses this control has posted back.
' If so, check whether this controls contains
' only literal content, and if it does,
' it gets the UniqueID property and writes it
' to the page. Otherwise, it writes a message
' that the control contains more than literal content.
Overrides Protected Sub OnLoad(ByVal e As EventArgs)
If Page.IsPostBack = True Then
Dim s As String
If Me.IsLiteralContent() = True Then
s = Controls(0).UniqueID
Context.Response.Write(s)
Else
Context.Response.Write( _
"The control contains more than literal content.")
End If
End If
End Sub