Use CodeBehind instead of DLL - asp.net

I want to add new pages to a website without being have to recompile the whole site and copy the new dll to the bin folder.
I just want to upload the aspx files + the cs files.
Right now, when I try to do it the page won't load.

If you are working with a Web Application Project, you have to compile and copy the dll and aspx files.
In your case you could also use a Web Site project. ASP.NET will compile your code while it's being accessed so you can only deploy new aspx and cs files.
Here you can find an overview of the differences between Web Application Project and Web Site Project and also a few hints on when to choose which.

Related

From what parts does the built Asp web forms application consists?

Can't google with a success an info about: from what parts does the built Asp web forms application consists? In a Debug folder I see only dlls, but as far as I understand the aspx pages and a web.config file should exist. Any links?
The BIN folder contains the compiled code behind. The ASPX pages and web.config stay in the same place, the root directory of your application.
Further reading:
ASP.NET Web Project Folder Structure
How to: Publish Web Application Projects
Asp applications, unlike windows forms applications need to be published first.
Right click on your project and click publish. From there pick file system option and publish to wherever you want on your computer.
Those files are the ones you upload to ftp server.

asp.net unpublishing

I published my web application to a folder , after I hosted that folder on a server,but my project codes are broken.Now I will republish(unpublisch) my application from the publish folder. I will see my aspx page's .cs codes.how can I see
you have no choice to unpublish your code. While you work on the project before publish u have to take the copy of the project. while publishing ur codes are converted to dll. no way to recover ur codes from the dll.

trying to deploy an aspx page to webserver 'This is a marker file generated by the precompilation tool, and should not be deleted!'

I have precompiled my code and added it to my webserver but when I try to access the page
I am getting this message
This is a marker file generated by the precompilation tool, and should not be deleted!
How do I remove this so I can see my page?
It seems you have deplyed a precompiled asp.net application. Did you remember to copy the generated assemlies (bin directory)?
Precompiled websites uses empty aspx files for routing hooks (unlike the mvc routeing engine). This is why you have a bunch of "empty" aspx files.

Asp.net Web Service CS file moved?

I hardly use web services, but just noticed now when I created one, the CS file was dumped in the App_Code folder. Is that a new thing?
I always thought it behaved much like an Aspx or Ascx file with the nested code behind CS file.
That's because you are using a Web Site in contrast to Web Application. Web Sites are compiled dynamically at runtime by the ASP.NET runtime. In this model all code goes into the App_Code special folder. When deploying you need to upload your source code as well.
On the other hand a Web Application is compiled. You can place the code wherever you like and for things like .ASPX, .ASCX, .ASMX, .ASHX, ... Visual Studio nests the code file next to the markup.

adding pages in live asp.net site dynamically without redeploying or recompiling?

Is there some way to add .aspx pages in live asp.net site without need to recompile or redeploy ? Please guide me.
thanks
I do not exactly understand what do you mean by "no recompile or redeploy", but:
If you use Asp.Net web site(and not web application) you can just copy aspx file with it's cs file to the web site directory and it will work.
You can simply upload aspx and cs page to the given location. If you publish your site you can upload only page related dll and aspx page.

Resources