VS.NET Newbie Q


J

Justin Dutoit

I'm new to visual studio.net, and on a page I've got the error:

Could not load type 'WebApplication12.WebForm1'.

Source Error:

Line 1: <%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" Inherits="WebApplication12.WebForm1"%>



It is just the code-behind class (which inherits page). I ftped the .asp and
the aspx.vb files onto my hosting server, and I got the error straightaway.
Why would it say that, could not load type?

Thanks
Justin Dutoit
 
Ad

Advertisements

M

Marshal Antony

Hi Justin,
As you use VS.NET,it will automatically pre-compile the class in the
codebehind file and use the inherits attribute to point to
that class from your .aspx file.The .dll file which is created is placed in
the \bin sub directory of your application virtual directory.
Your web application is looking for the class called WebForm1 in
the dll in the \bin sub directory in your application virtual directory
on your hosting server.Copy your bin directory of your web application
which contains the dll from your development machine to the
application virtual directory in your hosting server and you are in
business.

Hope this helps.
Regards,
Marshal Antony
http://www.dotnetmarshal.com
 
N

.NET Follower

hi,
what is .ShoppingCart'. ascx control..
plz be desrciptive....

what exactly is ur problem
 
Ad

Advertisements

G

Guest

Dear Amit

I have created a new file ShoppingCart.aspx file. First when i build and browse, I get the following erro
++++++++++++++++++++++++++++++++++++++++++++++++++++
Server Error in '/OnLineShopping' Application
-------------------------------------------------------------------------------

Parser 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 'OnLineShopping.ShoppingCart'

Source Error:

Line 1: <%@ Page Language="vb" AutoEventWireup="false" Codebehind="ShoppingCart.aspx.vb" Inherits="OnLineShopping.ShoppingCart"%
Line 2: <%@ Import Namespace="System.Web" %
Line 3: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"


Source File: C:\Inetpub\wwwroot\OnLineShopping\ShoppingCart.aspx Line: 1

-------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

and secondly i'm doing the following thing in the codebehind(ShoppingCart.aspx.vb
*****************
Public Class ShoppingCar
Inherits System.Web.UI.Pag

#Region " Web Form Designer Generated Code

'This call is required by the Web Form Designer
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent(

End Su

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Ini
'CODEGEN: This method call is required by the Web Form Designe
'Do not modify it using the code editor
InitializeComponent(
End Su

#End Regio

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loa
'Put user code to initialize the page her
Response.Write("hello"
End Su

End Clas

*****************
It is just a response.write and it does not work too. Please help in solving these two problems. I am trying to move to asp.net from classic asp. My email is (e-mail address removed). I would be obliged if u can help as i can't make anything of vs.net!!

Thanku so much

----- .NET Follower wrote: ----

hi
what is .ShoppingCart'. ascx control.
plz be desrciptive...

what exactly is ur proble
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top