hi all
i port my window form inherits textbox to asp.net
this textbox only allow numeric to be enter during keypress event.
but it is not working on asp.net. how do i write a keypress event on asp.net?
Public Class NumbericText : Inherits TextBox
Public Event OnEnterKeyPress()
Dim MyInput As Cinput
Public Property CharacterInput() As Cinput
Get
Return Me.MyInput
End Get
Set(ByVal value As Cinput)
Me.MyInput = value
End Set
End Property
Protected Sub OnKeyPress(sender As Object, e As EventArgs)
MyBase.OnTextChanged(e)
If Asc(MyBase.Text) = 13 Then
RaiseEvent OnEnterKeyPress()
End If
Select Case Me.MyInput
Case Cinput.CharactersOnly
If IsNumeric(MyBase.Text) Then
MyBase.Text = MyBase.Text
End If
...
Go to the complete details ...