|
|
 |
BOOK: ASP.NET 2.0 Beta Preview  | This is the forum to discuss the Wrox book ASP.NET 2.0 Beta Preview by Bill Evjen; ISBN: 9780764572869 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: ASP.NET 2.0 Beta Preview section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|

February 21st, 2005, 12:36 AM
|
|
Registered User
|
|
Join Date: Feb 2005
Location: Burlington, Vermont, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
can't run samples outside of IDE
code samples run fine from within IDE but get error message when I try to outside. for example, the calculator pp62-64:
Compiler Error Message: BC30002: Type 'Calculator' is not defined.
it's not a data access problem for this example. 'Calculator', by the way, is in the code folder as recommended in the book. my IIS home directory is \inetpub\wwwroot and the file is in Websies\website1 below this. IIS has ASPNET 2.0 showing.
|

February 23rd, 2005, 10:53 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Could you post the code, I don't have the book. You are using Visual Studio .NET beta?
Brian
|

February 24th, 2005, 01:21 AM
|
|
Registered User
|
|
Join Date: Feb 2005
Location: Burlington, Vermont, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
here's the script on main page:
----
<script runat="server">
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim myCalc As New Calculator
Label1.Text = myCalc.Add(12, 3)
Label2.Text = myCalc.Subtract(34, 67)
End Sub
</script>
----
The html just displays labels. the Calculator is defined in the code folder -- for testing I did the Add as VB and the Substract as CS :
-------- VB
Imports Microsoft.VisualBasic
Public Class Calculator
Public Function Add(ByVal a As Integer, ByVal b As Integer) As Integer
Return (a + b)
End Function
End Class
--------
-------- CS
using System;
public class Calculator
{
public int Subtract(int a, int b)
{
return (a - b);
}
}
--------
webconfig file:
.
.
<system.web>
<compilation debug="true">
<codeSubDirectories>
<add directoryName=" VB"></add>
<add directoryName="CS"></add>
</codeSubDirectories>
</compilation >
</system.web>
.
.
-------
It runs fine out of the IDE (visual web developer express - part of visual stdio 2005) but gives error when I run the same program in IE (whichs runs other examples fine)
Thanks for any help you can give.
JAB
|

February 24th, 2005, 08:31 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
You can't have the same class defined twice. In this situation, I don't know if that is the case. Defining the same class in VB and C# doesn't merge the methods into the same object.
Brian
|

February 24th, 2005, 10:51 AM
|
|
Registered User
|
|
Join Date: Feb 2005
Location: Burlington, Vermont, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks.
My point is that when I use the IDE to run it, it works fine. By the IDE I mean Visual web developer -> RUN which opens a port. My IIS shows that Framework 2.0 is active....
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |