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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parser error with codebehind on global.asax

Status
Not open for further replies.

qwert231

Programmer
Sep 4, 2001
756
US
Coming in at 6:30 AM is not productive, as much as they might think!

K, Here is what I get:
Parser Error Message: Could not load type 'theimageconnection.Global'.

Source Error:
Line 1: <%@ Application Codebehind=&quot;Global.asax.vb&quot; Inherits=&quot;theimageconnection.Global&quot; %>


That's the assembly name... there is nothing in the global.asax or global.asax.vb. Can I delete these?

 
I am not sure why you are getting this. However, I do have a question. What are you trying to do here? It looks like the class/assemble you are trying to reference simply doesn't exist. That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Hmmm... okay... let's see... (Please bear with me, I am doing a bunch of different things today.)

The message at the top was for the global.asax page. All I did for that was move the code to a script block in the file. It's pretty much blank anyways... and now no code behind, so no problem, TILL I get to my actual page.

Same message, but the class for that page now.
Could not load type 'theimageconnection.jobRenumber'.

jobRenumber is the name of the class in the Codebehind. The file is compiling... or it seems to be. jobRenumber is listed in the class listing of the project.

Not that it matters much (doesn't look wrong anywhere) but here is the code:
Here's the codebehind:
Code:
Imports System.IO.FileStream
Imports System.IO

Public Class jobRenumber
 Inherits System.Web.UI.Page
 Protected WithEvents job1 As System.Web.UI.WebControls.TextBox
 Protected WithEvents Label2 As System.Web.UI.WebControls.Label
 Protected WithEvents Label1 As System.Web.UI.WebControls.Label
 Protected WithEvents job2 As System.Web.UI.WebControls.TextBox
 Protected WithEvents numStart As System.Web.UI.WebControls.TextBox
 Protected WithEvents Label3 As System.Web.UI.WebControls.Label
 Protected WithEvents goBtn As System.Web.UI.WebControls.Button
 Protected WithEvents ListBox1 As System.Web.UI.WebControls.ListBox

#Region &quot; Web Form Designer Generated Code &quot;

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

 End Sub

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

#End Region

 Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  'Put user code to initialize the page here
 End Sub

 Private Sub goBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles goBtn.Click

  Dim path As String = &quot;Y:\Jobs2\&quot; & job1.Text & &quot;\&quot;
  Dim di As New DirectoryInfo(path)
  Dim File As FileInfo

  For Each File In di.GetFiles(&quot;*.jpg&quot;)
   ListBox1.Items.Add(File.Name.ToString)
  Next

 End Sub
End Class
 
try rebuilding the page in a test page. If it works then delete the current one and remake it. Using good ol copy paste of course. If it doesn't work then try a test project. That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Nada... haven't gotten much time to work it tho...
 
Hmmm... Went to Debug the app via the play button (Start or F5) but it says the debugger isn't set up on the Web Server. Do I need to install VS on the server? or can I just install some components?
 
In web config, under the compilation/assemblies section, I did:
<add assembly=&quot;assemblyName&quot; />
 
It's working now? That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top