Creating Custom Button control using Asp.Net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • VijaySofist
    New Member
    • Jun 2007
    • 107

    Creating Custom Button control using Asp.Net

    Hi All!

    Somebody Please Help/Guide me to complete my module.

    Tools Used
    -----------
    Asp.Net Server Control (Asp.Net 3.5)
    Windows XP
    Code Behind is visual basic

    My Module
    ----------
    I want to create a Button control. When it is clicked a function named GoNext() will be called and the definition of the GoNext() will be given in the code behind of the EndUser WebForm(i.e where the control is going to be used).

    My Source Code is:
    ------------------
    Code:
    Imports System
    Imports System.Collections.Generic
    Imports System.ComponentModel
    Imports System.Text
    Imports System.Web
    Imports System.Web.UI
    Imports System.Web.UI.WebControls
    
    Namespace SfNextCmd
        <DefaultProperty("Text"), ToolboxData("<{0}:SfNextCmd runat=server></{0}:SfNextCmd>")> _
       Public MustInherit Class SfNextCmd
            Inherits Button
            Public MustOverride Function GoNext()
    
            Private Sub SfNextCmd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
                GoNext()
            End Sub
        End Class
    End Namespace
    Also if it is possible thro SilverLight Please send me the source code.

    Thanks and Regards
    Vijay. R
Working...