vb System.Web.UI.WebControls.Button.IPostBackEventHandler.RaisePostBackEvent类(方法)实例源码

下面列出了vb System.Web.UI.WebControls.Button.IPostBackEventHandler.RaisePostBackEvent 类(方法)源码代码实例,从而了解它的用法。

作者:VB.NET开发    项目:System.Web.UI.WebControl   
<System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand, Name:="FullTrust")> _
Public Class CustomButtonRaisePostBackEvent
    Inherits System.Web.UI.WebControls.Button

    Private message As String = System.String.Empty

    Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
        ' Render a HTML submit button.
        writer.Write("<INPUT TYPE='submit' name='" + Me.UniqueID + "' value='Click Me' />")
        writer.Write("<BR>" + message)
    End Sub

    ' Note: VB.NET does not allow one to re-implement a base class interface, whereas C# does.
    ' Hence, just use the base class's PostBackEventHandler's RaisePostBackEvent method,
    ' which calls the OnClick method.

    Protected Overrides Sub OnClick(ByVal e As System.EventArgs)
        message = "RaisePostBackEvent method successful!"
    End Sub
End Class


问题


面经


文章

微信
公众号

扫码关注公众号