I have a class named "Person" defined in the App_Code folder with Visual Web Developer 2008 Express Edition. It was working fine when I set it up the other day. Now, I get the message "BC30002: Type 'Person' is not defined" when I reference the class in my code behind page.
I'm getting a: mypage.aspx.vb(390,0): error BC30002:Type 'MyNamespace.MyClass' is not defined when I try to compile, run, etc. my website. What's really odd is that I don't have anything in my Error List before or after I do this. I wouldn't have an idea of what was wrong, except I have my compile verbosity turned way up. The line it's failing on looks like:
I am running a web server using VB.net and I have a bunch of pages that need to utilize similar functionality, so I was thinking of creating a shared base class that incorporates all of this shared functionality. I created a file call it SharedBaseClass.vb, and I also have a class that should inherit from this class, SubClass.aspx.vb. The Top few lines of the the parent class look like this:
Partial Class SharedBaseClass Inherits System.Web.UI.Page
And of the child class that should inherit:
Partial Class SubClass Inherits SharedBaseClass
Then at the top of the SubClass.aspx file it looks like this:
Assume that all of these files are located in the same directory.But when I try to run this, I get an error:Compiler Error Message: BC30002: Type 'SharedBaseClass' is not defined.And then the highlighted error is on the line that reads: Inherits SharedBaseClass I've also tried importing the file to no avail.
I am developing a VB.NET application in which I use a DataGrid; I can't use the newer DataGridView due to version. But now when I try to compile this, I get the error:
[Code]...
What can I replace this line with? I have read on the internet that since my application should be web-based, I cannot use the Windows namespace. I think what I am asking for is a pretty simple solution, but I am a very new VB programmer. More of my code below.
I've got an ASP.NET application that I installed by creating a web setup. I ran into a problem where ASP.NET wasn't registered with IIS so it gave me a "installation was interrupted" message that told me exactly nothing. Anyhow, I finally got it installed, and I can access the main page, but it's telling me that my class isn't defined. The dll is in the same directory as the Default.aspx page Here's the main error information
Compiler Error Message: BC30002: Type 'SIValidator.SIValidator' is not defined.
Source Error:
Line 4: Line 5: <script runat="server"> Line 6: Dim validator As New SIValidator.SIValidator() Line 7: Protected table As New arrayList()
[code]....
Is there some obscure setting that may not be set?
I have this code working. It sets the Visible property of controlToSecure to False. [Code] However I would like to get rid of hardcoding types of properties. In this case i'm hardcoding Boolean. Instead I would like to define the property type dynamically. I tried it like below but I get an error on line 2 "Type property Type is not defined". I just defined that type on the line before though? Does anyone know why this doesn't work and how i could get it to work? [Code]
I'm running a button click event so that it will open a spread sheet from a certain path and export it as a pipe delimited as a seperate file name. Everything looks fine except for this one error I keep getting..."Type 'Excel.ApplicationClass' is not defined". I have imported Microsoft.Office.Interop.Excel as well and have added a reference library. I am currently running Visual Studio 2010. Here is the code.
Private Sub btnRun_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'My.Computer.FileSystem.CopyFile(txtBrowse.Text, "Original_Copy.xls", Microsoft.VisualBasic.FileIO.UIOption.OnlyErrorDialogs, FileIO.UICancelOption.DoNothing)
Type 'datestamp' is not defined...How can I update it to resolve the error..
Dim blank As New DateTime(1900, 1, 1, 0, 0, 0) For row As Integer = 0 To dgvReturns.Rows.Count - 1 Dim value As Object = DgvReturns.Rows(row).Cells(9).Value
I'm trying to implement the GetHttpContext function from HtmlHelperTest.cs in VB.NET using Rhino Mocks, but I'm getting "Type 'HttpContextBase' is not defined." The compiler suggests changing it to HttpContext, but when I do that I get a run time error that a sealed class cannot be mocked.My test project references System.Web and also imports that namespace. Is there something else I need to do in order to get the HttpContextBase type to be visible to the code I'm witting?
[url] aspx has an example of using invoke to write to a textbox from a different thread than where it was created. I need to do this in a current program I am working on, so I tried the VB version of the code in my VB 2008. I get an error at "Dim d as New SetTExtCallback(AddressOf SetText)" stating that Type'SetTextCallback' is not defined. In the example, SetTextCallback is not defined anywhere - something they left out?
Sub ChangeLanguage(ByVal caller As Object, ByVal lang As String) Dim c As Control = caller.GetNextControl(caller, True) Do Until c Is Nothing
[code].....
I call the sub with:
ChangeLanguage(Me, "en")
The problem I have is that I get the error: "Type 'caller' is not defined."If I change GetType(caller) to GetType(vbLogin) it works fine. (vbLogin is one of the forms)I need to find a way to get it working using caller though.
I found the code below and when i run it I get the message Type 'BindingSource' is not defined. What do I need to do to get it to work. I just want to run it and try it out!!!!!!
I am experimenting with RavenDB embedded in my application. I am receiving a "Type 'EmbeddableDocumentStore' is not defined" error. I do, however, have a reference to Raven.Client.Embedded in my project.
Here's my VB.Net code:
Imports Raven.Client.Client Imports Raven.Client Sub Main()
First I put it inside a Module and it works just fine. However when I created a Class and put it inside it, it showed up some errors. (they are in the code's comments)
Public Class MyImageClass 'function to merge 2 images into one Public Function Merge(ByVal img1 As Image, ByVal img2 As Image) As Image 'Type 'Image' is not defined Dim bmp As New Bitmap(Math.Max(img1.Width, img2.Width), img1.Height + img2.Height) 'Type 'Bitmap' is not defined [Code] .....
I tried importing the System.Drawing namespace to this class which didn't change anything either. I've never really touched the OOP side of VB.NET before, this is my first attempt creating a class.
I am writing some simple utility applications in VB.NET. I am using Visual Studio 2010 Express.I'm trying to throw a FileFormatException exception in my code if a user specifies a file that has the wrong extension. Documentation indicates that this exception has been around since .NET 3.0. See
[URL]
However, Visual Studio gives me an error saying that System.IO.FileFormatException is not defined. It's not a typo, either. FileFormatException appears in the object browser in System.IO, but doesn't appear in the Intellisense drop down when I type System.IO.File.
Here is my simple function:
Function ValidateDBFile(ByVal DbFilePath As String) As Boolean ValidateDBFile = False If IO.File.Exists(DbFilePath) Then Dim flInfo As New IO.FileInfo(DbFilePath)
I have no experience with VS 2008 Express yet. But, I need to use it to make a small VB app for work that connects to an Access database and gets table values.I have no samples to work from. I keep getting the error: Type 'ADODB.Connection' is not defined. How do I create the reference to ActiveX Data Object?
I dont get this. I use code from one project that works and paste into anther and now its full of errors.
I have no clue how to solve this (See attached image).All of the errors have to do with Excel and Outlook applications.The info for "Imports" section is the same as my other project and all the "Dims" are the same as well. (These are two separate projects).Basically, I copied a form from one app and made a stand alone app for that form.
When I dynamically compile SilverLight 4.0 application using Microsoft.VisualBasic.VBCodeProvider, I get the following error.
Line: 118 ErrorCode: BC30002 Error: Type 'System.ComponentModel.Design.HelpKeyword' is not defined. Line: 130 ErrorCode: BC30002 Error: Type 'System.ComponentModel.Design.HelpKeyword' is not defined. Line: 141 ErrorCode: BC30002 Error: Type 'System.ComponentModel.Design.HelpKeyword' is not defined. Line: 234 ErrorCode: BC30002 Error: Type 'System.ComponentModel.Design.HelpKeyword' is not defined.
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Click, Open.Click,Name.Click SelectVid.ShowDialog() End Sub
[code]....
I keep getting this error:
Error1'.' expected. Error2Handles clause requires a WithEvents variable defined in the containing type or one of its base types. Error 2 is also error 3