温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:DotNetNuke04.08.03免安装版项目源码
当前文件路径:DNN/Library/Controls/LiteralTemplate.vb

1' 2
' DotNetNuke?- http://www.dotnetnuke.com 3
' Copyright (c) 2002-2008 4
' by DotNetNuke Corporation 5
' 6
' Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7
' documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8
' the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9
' to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10
' 11
' The above copyright notice and this permission notice shall be included in all copies or substantial portions 12
' of the Software. 13
' 14
' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15
' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16
' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 17
' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18
' DEALINGS IN THE SOFTWARE. 19
' 20
21
Namespace DotNetNuke.UI.WebControls 22
Public Class LiteralTemplate : Implements ITemplate 23
Private m_strHTML As String = "" 24
Private m_objControl As Control 25
Public Sub New(ByVal html As String) 26
m_strHTML = html 27
End Sub 28
29
Public Sub New(ByVal ctl As Control) 30
m_objControl = ctl 31
End Sub 32
33
Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements System.Web.UI.ITemplate.InstantiateIn 34
If m_objControl Is Nothing Then 35
container.Controls.Add(New LiteralControl(m_strHTML)) 36
Else 37
container.Controls.Add(m_objControl) 38
End If 39
End Sub 40
End Class 41
End Namespace 42






