Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. Getting or Setting Controls & Other hardcoded values from database

Getting or Setting Controls & Other hardcoded values from database

Scheduled Pinned Locked Moved Design and Architecture
databasequestioncsharpasp-netperformance
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    meeram395
    wrote on last edited by
    #1

    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.

    L S 2 Replies Last reply
    0
    • M meeram395

      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.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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:

      1 Reply Last reply
      0
      • M meeram395

        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.

        S Offline
        S Offline
        senguptaamlan
        wrote on last edited by
        #3

        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[^]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups