Click here to Skip to main content
15,883,558 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have moved user defined values present in web.config to database.i retreive the values from database on appliction_start event of global.cs file and store those values in dictionary collection and will use throughout the application.
now my problem is if i change any value in database the changes will not be reflected, to reflect the changes i have to reset the iis.hence to reflect the changes immediately or after a particular interval is there possibility like invoking the application_start event again or some other way.

please help....
Posted
Updated 16-Sep-14 20:04pm
v2
Comments
Sergey Alexandrovich Kryukov 17-Sep-14 2:10am    
Why, why do you think that you need to reset IIS?! You are doing something wrong. How can we know what?
One general advice: learn MVC. Start with learning what is MVC patter is. This is not mandatory, but can be useful for you.
—SA
rahulshek 17-Sep-14 5:48am    
see i have a textbox as cardnumber when i run my application cardnumber is fetched from database as 123545xxx and it is shown.so if i change the cardnumber in database the changes is not reflected immediately.when i tried by restarting the IIS the changes is reflected.hence i am looking for a solution to this.

1 solution

Have a look at the Observer[^] design pattern.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 17-Sep-14 3:17am    
In my comment to the question, I advised to look at MVC as design pattern, but looking at the observer is also useful; a 5.
Did you pay attention for something more serious: OP had to restart IIS. This is fundamentally wrong.
—SA
CPallini 17-Sep-14 4:15am    
Thank you. No, I didn't notice. You are right, that's wrong.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900