I used a text editor to create a aspx file and its code-behind c# file, then
I put these two files in the ...inetpub\wwwroot\test folder. When I tested
it, the result was that the code-behind is ignored.
When I used Visual Studio to do the same, the result was correct. Please
advise.
Peter
S. Justin Gengo - 28 Oct 2005 17:16 GMT
Peter,
The code needs to be compiled and the resulting .dll file needs to be in the
bin folder of the website (you also need the .aspx page with the display
code in it). The codebehind file isn't used in a deployed site.

Signature
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
>I used a text editor to create a aspx file and its code-behind c# file,
>then
[quoted text clipped - 4 lines]
> advise.
> Peter
Sreejith Ram - 28 Oct 2005 17:26 GMT
I havent tried this. But I believe you will need to compile the C# code
behind using csc.exe before deployment..
> I used a text editor to create a aspx file and its code-behind c# file, then
> I put these two files in the ...inetpub\wwwroot\test folder. When I tested
[quoted text clipped - 3 lines]
> advise.
> Peter
Kevin Spencer - 28 Oct 2005 21:50 GMT
It's all a matter of the model you use. You can use a page without a
CodeBehind, a page with a compiled CodeBehind (in a DLL in the \bin folder),
or a page with a non-compiled CodeBehind. Visual Studio uses the compiled
CodeBehind model by default. To use a non-compiled CodeBehinid, you have to
change the @Page directive, add a "src" attribute which specifies the
location of the CodeBehind file. The "CodeBehind" attribute is used only at
compile-time, and does not come into play at run-time. If you put the class
execution in a Code Block in the page, and don't use a separate CodeBehind
file, you don't need the "src" attribute.

Signature
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
A watched clock never boils.
>I used a text editor to create a aspx file and its code-behind c# file,
>then
[quoted text clipped - 4 lines]
> advise.
> Peter