Hi ,
I am trying to check for a numeric input. I had this procedure in windows app and Im trying to put it in web but Im getting an error on
ctl.text in the code below
any ideas how I can correct this pleased.. Many thanks
VB Code:
Private Sub Submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submit.Click Dim bLoop As Boolean = True Do While bLoop = True bLoop = False Dim ctl As Control For Each ctl In Me.Controls 'checks to see if all required textboxes have been completed If [B]Trim([COLOR=RoyalBlue]ctl.Text[/COLOR]) [/B] = "" And TypeOf ctl Is TextBox Then Msgbox("Please make entry for " & ctl.ID.ToString) bLoop = True End If Next Select Case False 'check for numeric entry Case CheckNumeric(txtmobile.Text) txtmobile.Text = Not (IsNumeric("Mobile")) bLoop = True Case CheckNumeric(HomeTel.Text) HomeTel.Text = Not (IsNumeric("HomeTel")) bLoop = True End Select Loop




Reply With Quote