Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update an asp.net website (just changed files)

Tags:

file

asp.net

I am developing an asp.net website that will need regular updates for source codes and HTML sides. After i have completed the necessary updates, i use the 'publish website tool' and publish the site to my local directory. Then i upload all files to Remote File.

Is there any way to fix my site with just changed files. For example if i have updated just 2 files of 84 (HTML or source side), is it possible to update just this 2 files without any problem?

like image 341
Enes Avatar asked Apr 13 '09 09:04

Enes


People also ask

How do I add a new ASPX to an existing project?

In Solution Explorer, right-click the project name, and then click Add Existing Item. In the Add Existing Item dialog box, navigate to the directory containing the Web page that you want to add, select the page, and then click Open. The ASP.NET Web page is added to the Web site project.

What is updating in asp net?

Updating data into the database – ASP.Net can also be used to update existing records into the database. New values can be specified in ASP.Net for each row that needs to be updated into the database. Deleting data from a database – ASP.Net can also be used to delete records from the database.


2 Answers

While Visual Studio does offer a few different compiling/build options, I think that you are probably doing everything just fine for a Visual Studio Website project. When I'm working with a website rather than a web application, I will only FTP the files that have changed. For example, if I were to change some HTML tags around within an .aspx page, then only that page would need to be uploaded to the web server. If I change the Page_Load function in the .aspx.cs page, then I will definitely need to get the updated DLL on the web server as well.

I use FileZilla for my FTP tool and there is an option to only upload the changed files. So after you use visual studio to publish your website, you can grab the entire contents of that directory and drag it over to the FTP server location and only update what has changed.

like image 135
RSolberg Avatar answered Sep 27 '22 15:09

RSolberg


The ASP.NET website project offers an option in the Project properties -> "MSBuild Options" tabpage where you can set "Allow this precompiled site to be updatable".

Setting this option

"Specifies that the content of .aspx pages are not compiled into an assembly; instead, the markup is left as-is, allowing you to change HTML and client-side functionality after precompiling the Web site. Selecting this check box is equivalent to adding the -u option to the aspnet_compiler.exe command."

according to the docs.

like image 44
Cerebrus Avatar answered Sep 27 '22 17:09

Cerebrus