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. Visual Studio
  4. ASP.NET woes ...

ASP.NET woes ...

Scheduled Pinned Locked Moved Visual Studio
databasehelpcsharpasp-netdesign
1 Posts 1 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.
  • D Offline
    D Offline
    DFU23
    wrote on last edited by
    #1

    This is starting to confuse me and I think (?) this is a good place to post this problem. I am building a rather small and simple application so I have chosen to use an Access database for starting off. I like how simple things can be to make a web app with the Design View when making a ASP.NET application ... I think it handles most things pretty decently ... except I am stuck as to how to get the connection to the Access database in the Design view. I use the Server Explorer and connect to the Access DB with no problem. I drag the DB from the Server Explorer into my page and it creates a connection. Everything appears to be playing along nicely so far ... However, there is a problem. This application is going to reside on some other web server and I will need to do the old ASP trick of Server.MapPath() in the connection string. This is the beginning of my frustration. Since the connection string needs to be dynamically created (to get the absolute path to the DB) I cannot slap a static connection string as a key in the web.config file. Since the code behind likes to do its own thing in its "Web Form Designer generated code" segment in order to initialize connections and handle events I cannot go and try to change the connection string in there. I have tried to modify it and when it finds the change it simply takes out the connection string initialization completely. Any suggestions on a way to get around this?

    Wally Atkins
    Newport News, VA, USA

    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