Krish
Krish

Reputation: 137

c# help needed for application update

Hello guys I think the question i asked in the previous post is unclear OK fine. i am explaining in brief. for example. I have a form where i have placed one textbox and command button. I have fired a event when i click the button the text under the textbox change to "hello" ok fine.

what is my problem is.. the application is created and I published ok. After some week I thought I want to update my application. where in the place of "hello" I want "hi". I know that we can compile the whole project and publish it. but I don't want my whole application to be updated. for example. What antivirus company do they have a definition file where they only update the definition file not the whole application. after the update it applies to whole application.

I want my application also to do same process like antivirus company do.

Upvotes: 1

Views: 175

Answers (5)

Mironline
Mironline

Reputation: 2799

if you want to create a patch for asp.net application , first of all , you have to deploy your project with Web Deployment Project.

then choose Create a separate assembly for each page and control output in output assemblies tab and re-build your solution . the result of deployment is bunch of DLL which mapped to each page or control.

Now if you changed one page's data (in code behind) , you need to deploy your project again but in this case you can just upload the changed dll file.

Upvotes: 0

Bruno Costa
Bruno Costa

Reputation: 2720

For your specific question, I'll answer the same thing as Henk. But, I think that your real question is "How I do create patch in .NET".

You can check this link:

How can I patch .NET assemblies?

Upvotes: 1

KeithS
KeithS

Reputation: 71573

Use a configuration file. You can add an application.config (or if you're developing a web app, web.config) file to your primary project. Within this configuration file, you can define AppSettings (which are built-in, usually simple and atomic string or number fields that the application will need), ConnectionStrings (which specifically provide information applications will need to connect to a database), or custom configuration sections (used for more complex, related sets of data that are loaded into custom classes you define, such as a basic company profile). Within your code, you access AppSettings by using the static ConfigurationManager.Appsettings[] collection; you tell it the name of the setting you defined in the file, and it returns the value (or null, if it can't find the setting you defined).

Related, but different, is the use of Resource files. Resource files usually contain a dictionary of location-specific data used by the UI, such as text strings, icons and images. Actual resources can be compiled into one big file, or resource files can be a list of paths and filenames to the actual resources. You can use resource files to create different "skins" for your application to be used by different companies by referencing images to use for UI elements, or to translate labels and other text on your application's UI. Resource files are accessed through a ResourceManager; you tell it where the resource file is, and it will load the information into a similar "dictionary"; you then tell it the name of the resource and you get the resource back.

Upvotes: 1

Henk Holterman
Henk Holterman

Reputation: 273244

You should read that "Hello" from a content file (XML). Then you can just push out the new file.

Upvotes: 5

Darin Dimitrov
Darin Dimitrov

Reputation: 1038790

You could design your application to use plugins. This way you only have to update a plugin and not the whole application.

Upvotes: 0

Related Questions