Getting or Setting Controls & Other hardcoded values from database
-
I have a requirement that, the text of the controls and other hardcoded values in the application (for eg. exception message such as user friendly message etc.) will be stored and read from database. This requirement is not mandatory,but if present, it will be good. If provided, the user can go and edit the text whenever he wants. So I am thinking of what is the best approach of doing this. I can just store it and retrieve from sql query or stored procedures. But, that I think is ugly way of doing it. Is there any other better approach? As I am using ASP.net 3.5 version, I don't want any performance degrade of the pages because of this process. Could anyone please provide some suggestions or guide me toward some good articles? I searched in google but couldn't find an effective one. Thanks meeram395.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
-
I have a requirement that, the text of the controls and other hardcoded values in the application (for eg. exception message such as user friendly message etc.) will be stored and read from database. This requirement is not mandatory,but if present, it will be good. If provided, the user can go and edit the text whenever he wants. So I am thinking of what is the best approach of doing this. I can just store it and retrieve from sql query or stored procedures. But, that I think is ugly way of doing it. Is there any other better approach? As I am using ASP.net 3.5 version, I don't want any performance degrade of the pages because of this process. Could anyone please provide some suggestions or guide me toward some good articles? I searched in google but couldn't find an effective one. Thanks meeram395.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
meeram395 wrote:
Could anyone please provide some suggestions or guide me toward some good articles? I searched in google but couldn't find an effective one.
This[^] article on MSDN might help to move all the texts to the database. You'd still have to provide the user an edit-screen to manipulate the database-texts, and I think that changes wouldn't be visible until you restart the application.
I are Troll :suss:
-
I have a requirement that, the text of the controls and other hardcoded values in the application (for eg. exception message such as user friendly message etc.) will be stored and read from database. This requirement is not mandatory,but if present, it will be good. If provided, the user can go and edit the text whenever he wants. So I am thinking of what is the best approach of doing this. I can just store it and retrieve from sql query or stored procedures. But, that I think is ugly way of doing it. Is there any other better approach? As I am using ASP.net 3.5 version, I don't want any performance degrade of the pages because of this process. Could anyone please provide some suggestions or guide me toward some good articles? I searched in google but couldn't find an effective one. Thanks meeram395.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
you can store the value in a SQL Server Database table. Cache the data in application startup using ASP.NET cache engine. Make a SQL Server invalidation cache dependence over the cache, so whenever user changes the value in the table the cache gets invalidated. Repopulate the cache when there is a change in the underlying data table in SQL Server. So you are not pulling the data from SQL Serevr each time and only refresh the data in the cache whenever there is a change in the underlying data...as well as there will be no application restart requirement...a the cached data gets refreshed whenever there is a change in the underlying table....for information on SQL Server invalidation please refer the following link http://www.wrox.com/WileyCDA/Section/Using-the-ASP-NET-2-0-SQL-Server-Cache-Dependency.id-306459.html[^]