Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: Help with c# compiling - do I need SDK version?


Message #1 by "Heidi Alfreds" <heidia@n...> on Wed, 29 Jan 2003 18:51:07
I can't seem to get a straight answer from any groups searches I've done 
on this subject. I currently have .NET Redistributable installed on my 
Win2000 server. I'm using Dreamweaver MX as my editor. I did find the 
csc.exe file on the server, under the .NET Framework program, so I know it 
is actually there! I attempted to compile my c# file via the command line, 
and it appeared to work (i.e., no error messages). But then when I tried 
to call up my .aspx page from my brower, I got the following namespace 
error message (the namespace was declared in my c# file):

CS0246: The type or namespace name 'XmlHierMenu' could not be found (are 
you missing a using directive or an assembly reference?)

Do I need SDK for this to work, even though the Redistributible version 
has the csc.exe file? (I prefer not to install SDK since it is so large, 
most of which I don't even need for merely creating web apps with it.) 

I also attempted the "Beginning ASP.NET 1.0 with c#" Code-Behind File 
Exercise from Ch. 15 on p.622. I downloaded the code directly from this 
website, but it didn't work. I got this error message when calling up the 
the SimpleCodeBehind.aspx file:

BC30456: 'SubmitBtn_Click' is not a member of 'ASP.SimpleCodeBehind_aspx'.

Neither attempt seemed to recognize the code-behind file associated with 
it. 

Can anyone be of assistance, please?

Heidi
Message #2 by "Rohit Arora" <rohit_arora@i...> on Thu, 30 Jan 2003 17:13:55 +0530
A simple page directive in aspx file looks like this
	<%@ Page language="c#" Codebehind="xmlReader.aspx.cs"
AutoEventWireup="false" Inherits="JIBDemo.xmlReader" %>
It happens to be first line in aspx. It might change if u hv added some
usercontrol or something. I am not sure but it gave me errors when it was
second, or third line in my page.

Here Inherit tag says that JIBDemo is a namespace and xmlReader is a class
and where it is declared(In aspx file if u r using inline style i mean asp
style or otherwise in the file name given by value of codebehind tag which
is xmlReader.aspx.cs here. Now the problem it doesn't recognize code behind
file. If you don't mention it in codebehind parameter or page tag then it by
default looks in bin directory of the virtual site, i mean to say from where
u r tryin to run ur aspx page. Hope it helps.

peace
rohit

-----Original Message-----
From: Heidi Alfreds [mailto:heidia@n...]
Sent: Wednesday, January 29, 2003 6:51 PM
To: aspx_beginners
Subject: [aspx_beginners] Help with c# compiling - do I need SDK
version?


I can't seem to get a straight answer from any groups searches I've done
on this subject. I currently have .NET Redistributable installed on my
Win2000 server. I'm using Dreamweaver MX as my editor. I did find the
csc.exe file on the server, under the .NET Framework program, so I know it
is actually there! I attempted to compile my c# file via the command line,
and it appeared to work (i.e., no error messages). But then when I tried
to call up my .aspx page from my brower, I got the following namespace
error message (the namespace was declared in my c# file):

CS0246: The type or namespace name 'XmlHierMenu' could not be found (are
you missing a using directive or an assembly reference?)

Do I need SDK for this to work, even though the Redistributible version
has the csc.exe file? (I prefer not to install SDK since it is so large,
most of which I don't even need for merely creating web apps with it.)

I also attempted the "Beginning ASP.NET 1.0 with c#" Code-Behind File
Exercise from Ch. 15 on p.622. I downloaded the code directly from this
website, but it didn't work. I got this error message when calling up the
the SimpleCodeBehind.aspx file:

BC30456: 'SubmitBtn_Click' is not a member of 'ASP.SimpleCodeBehind_aspx'.

Neither attempt seemed to recognize the code-behind file associated with
it.

Can anyone be of assistance, please?

Heidi


  Return to Index