R
rn5a
Using VBC, I compiled a VB class file into a DLL named MyPro.dll. The
namespace used in this class file is 'MyPro' & the public class is
named 'MyClass'. This is the ASPX page which imports the namespace &
instantiates the class 'MyClass' so that the ASPX code can invoke the
different functions existing within the class 'MyClass':
<%@ Import Namespace="MyPro" %>
<script runat="server">
Public boMyClass As MyClass
Sub Page_Load(....)
boMyClass = New MyClass
...............
...............
End Sub
Sub MySub(....)
boMyClass = New MyClass
...............
...............
End Sub
</script>
Now what I find is though the above ASPX code works fine, on quite a
few occasions, when I make some changes in the ASPX page (not in the
class file) & then re-run the ASPX page in IE, ASP.NET generates the
error:
Name 'boMyClass' is not declared.
pointing to the line
Public boMyClass As MyClass
This forces me to compile the class (using VBC) again & again after
which only the ASPX page runs fine. Note that I didn't make any changes
in the class file (had I done that, then the class file, of course,
ought to be compiled each time any changes are made). I made changes
only in the ASPX page.
Can someone please tell me why am I encountering this error
intermittently?
namespace used in this class file is 'MyPro' & the public class is
named 'MyClass'. This is the ASPX page which imports the namespace &
instantiates the class 'MyClass' so that the ASPX code can invoke the
different functions existing within the class 'MyClass':
<%@ Import Namespace="MyPro" %>
<script runat="server">
Public boMyClass As MyClass
Sub Page_Load(....)
boMyClass = New MyClass
...............
...............
End Sub
Sub MySub(....)
boMyClass = New MyClass
...............
...............
End Sub
</script>
Now what I find is though the above ASPX code works fine, on quite a
few occasions, when I make some changes in the ASPX page (not in the
class file) & then re-run the ASPX page in IE, ASP.NET generates the
error:
Name 'boMyClass' is not declared.
pointing to the line
Public boMyClass As MyClass
This forces me to compile the class (using VBC) again & again after
which only the ASPX page runs fine. Note that I didn't make any changes
in the class file (had I done that, then the class file, of course,
ought to be compiled each time any changes are made). I made changes
only in the ASPX page.
Can someone please tell me why am I encountering this error
intermittently?