Name 'lbl_ExceptionMessage' is not declared
Posted on 2006-03-26
What's the quickest and easiest way to add a code-behind for any aspx if it doesn't have one already in VS 2005 and relate it to the correct aspx page on the fly? I find myself adding a new class file then having to link it by changing its properties every time which is a pain.
once I'm transfered to error.aspx I get "Name 'lbl_ExceptionMessage' is not declared." so I figure I need a code-behind page for error.aspx...but that is not possible to have 2 code-behind pages is it? The label is defined in my error.aspx page.
Partial Class _Default
Public Sub Run_Hedi2_Process(ByVal sender As Object, ByVal e As System.EventArgs)
'Declare and instantiate a new process component.
Dim myproc As System.Diagnostics.Process
myproc = New System.Diagnostics.Process
'Do not receive an event when the process exits.
myproc.EnableRaisingEvents = False
'Start Internet Explorer, passing in a web page.
Catch ex As Exception
lbl_ExceptionMessage.Text = ex.Message