Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

error: BC30451:Name 'IsNumeric' is not declared???

Posted on 2004-04-20
2
Medium Priority
?
1,083 Views
Last Modified: 2012-05-04
Hi there,

im having a problem compliling a custom control to a dll using dos

here is the code

Imports System.ComponentModel
Imports System.Web.UI
Imports System.Web

Namespace TestYear
<DefaultProperty("Text"), ToolboxData("<{0}:PubYear runat=server></{0}:PubYear>")> Public Class PubYear
Inherits System.Web.UI.WebControls.TextBox
Implements INamingContainer

Private _text As String = "" 
Private _response As String

Public Sub New()
Text = " "
End Sub

Public Overrides Property Text() As String
Get
Return _text
End Get
Set(ByVal Value As String)
_text = Value
End Set
End Property

Public Property Response() As String
Get
Return _response
End Get
Set(ByVal Value As String)
_response = Value
End Set
End Property

Private Sub PubYear_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.TextChanged
If Text = "" Then
Response = "Enter the Contact Number"
Else
If Not IsNumeric(Text) Then
Response = "Enter a valid Contact Number"
Else
Response = "" 
End If
End If
End Sub

End Class
End Namespace



When i go to compile i get the folowing error message:

error: BC30451:Name 'IsNumeric' is not declared

Can any one understand why, i wouldnt think it would need to be as i was under the impression it is a built in function???

any help would be appreciated!  Thanks!
0
Comment
Question by:evismaniac
2 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 10870695
If you look in the help file for IsNumeric, you will notice that it is in the Microsoft.VisualBasic namespace.  By default, Windows Forms applications include a reference to this namespace, but Web applications don't.

Bob
0
 

Author Comment

by:evismaniac
ID: 10870866
Thanks a lot, seems to work fine now.  pretty obvious im new at this huh! lol

:0)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question