Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VS.net is annoyin! whats up with this?

Status
Not open for further replies.

RhythmAddict112

Programmer
Jun 17, 2004
625
US
hey all...New vs.net and .net user here...Please bare with me. Im about to go back to notepad! okay...everytime I create a new web form vs.net puts a line like this at the top..

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm6.aspx.vb" Inherits="WebForm6"%>

That's all fine and well. When I start adding server controls to WebForm6.aspx, they do get added to the codebehind...When I try to load the page, i always get this error!

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'WebForm6'.

It only finds the codebehind when I change that top line to
<%@ Page Language="vb" AutoEventWireup="false" src="WebForm6.aspx.vb" Inherits="WebForm6"%>

Whats up with this? What am I missing here? I have a feeling this has somethin to do with the other error I get when I try to open a webForm that I had previously saved..

"The file failed to load in the Web Form designer. Please correct the following error...Visual studio cannot open designer for the file because the class within it does not inherit from a class that can be visually designed.

I dont necessarily care about even using "design" mode, but without it none of my controls get created on my codebehind..if someone can shed some light on these, I would really be appreciative.

Use your resources, you're on the internet!
 
hi, I had a similar problem when I started using VS.NET.
Look at your global namespace, example if your namespace is named WebForm, try Inherits="WebForm.WebForm6"

Make sure that when you build you create a dll in the bin directory.

I am a notepad user but I can say that VS.NET is very useful when creating massive projects. If you are creating 3 pages, use notepad. If you are creating a big project use VS.NET. And btw, VS.NET can be really annoying. Specially when adds tags automatically GRRR.

:) Hope this helps.
 
I have to say, notepad is looking downright sexy right now.
Spent like 10 minutes cleaning up code, rebuild and boom. Completley ugly again. -growl-

Thanks for your quick response..I have a couple of questions though....Firstly, how/where do I find my default namespace ( i guess for a given project )

And second, when you say create a DLL in the bin directory...How do i go about this? These all seem like thinsg I wouldnt have to do if i wasn't using vs.net..

thanks!

Use your resources, you're on the internet!
 
when you compile your project in VS.NET it creates a dll in the bin directory. Just go to the command line and look at your root of your project and you will see a bin directory there. to create a DLL a) you use VS.NET and use the BUILD option in the navigation bar or b) you compile from the command line. But as you want to use VS.NET try building your project. (Top Toolbar, select BUILD)

As to finding out the name of your namespace, open the global.asax.vb and look at it. That file gets created automatically when you create a new project in VS.NET
 
hmm..well, as far as my global.asax.vb all it has is..

Code:
Imports System.Web
Imports System.Web.SessionState

Public Class Global
    Inherits System.Web.HttpApplication

#Region " Component Designer Generated Code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Component Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Required by the Component Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Component Designer
    'It can be modified using the Component Designer.
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        components = New System.ComponentModel.Container()
    End Sub

#End Region

    Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
        ' Fires when the application is started
    End Sub

    Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
        ' Fires when the session is started
    End Sub

    Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
        ' Fires at the beginning of each request
    End Sub

    Sub Application_AuthenticateRequest(ByVal sender As Object, ByVal e As EventArgs)
        ' Fires upon attempting to authenticate the use
    End Sub

    Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
        ' Fires when an error occurs
    End Sub

    Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
        ' Fires when the session ends
    End Sub

    Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
        ' Fires when the application ends
    End Sub

End Class

I dont see any indication of my namespace :-/

Use your resources, you're on the internet!
 
I rebuilt and it populated my global...This is going to take some getting used to arghhhhhhh.thanks for your help Sonya, enjoy your weekend [wink]

Use your resources, you're on the internet!
 
You might also want to make sure you have installed the latest VS.NET service pack.

Chip H.


____________________________________________________________________
Click here to learn Ways to help with Tsunami Relief
If you want to get the best response to a question, please read FAQ222-2244 first
 
Hi, i am having the same problem... on my development environment using IIS 5.1 creating a project and runnig it works pretty well.. but when I try to move the solution to the productino server... it just doesn't work i get the

Parser Error Message: Could not load type 'Boletines'.

and the application won't run.

I am moving it "manually" i just copy the whols solution in the development environment (the whole folder in to the production server. Am I missing something? how should it be done?. BTW the production server has IIS 5.1 as well...

any help greatly appreciated.
 
Is Boletines a class in your code? I would look for a missing assembly, or an assembly which must be installed in the GAC, or an assembly that has a dependency on some component that isn't present.

Chip H.


____________________________________________________________________
Click here to learn Ways to help with Tsunami Relief
If you want to get the best response to a question, please read FAQ222-2244 first
 
Chip, Boletines is the name of the application I created in VS Studio via new command... There are no clases named like that anywhere... although n the bin directory there is a boletines.dll file generated by vs.

but if it is here, why cant it "find" it?


thanks a lot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top