Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2005

Tip: Looking for answers? Try searching our database.

The simplest ASPX page deployment

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter - 28 Oct 2005 17:01 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.