Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7783957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:59:45+00:00 2026-06-01T19:59:45+00:00

Sorry if this is a dumb question. I’m writing a simple 3 tier ASP

  • 0

Sorry if this is a dumb question. I’m writing a simple 3 tier ASP Web Forms app, how can I inject my connection string into my DAL to the LINQ to SQL Class

I believe this is pulling the con info from the App.Config in the DAL

    public LNQDataContext() : 
            base(global::bcDAL.Properties.Settings.Default.TM10_ArchiveConnectionString, mappingSource)
    {
        OnCreated();
    }

is there a way I could modify this to LINQDataContext(string conStr) ?? I really want the admin to be able to set this in the web.config (not have it hard coded in a dll) should he have to move stuff around.

Or any other insightful alternatives are welcome, thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T19:59:47+00:00Added an answer on June 1, 2026 at 7:59 pm

    The DataContext class generated for you via the DBML file is a partial, so just extend it with your own class that is named the same and add whatever additional constructor you need. However, I’m not sure why you think the connection string is hard coded with what you have. Dragging tables onto your DBML surface from the Server Explorer already adds a connection string to your web/app.config. That’s what global::bcDAL.Properties.Settings.Default.TM10_ArchiveConnectionString is pointing to in your example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry if this is a really dumb question - I can't find the answer
sorry for asking this dumb question i will try to explain as good as
Sorry if this is a dumb question. I'm using .each to loop through a
Sorry if this is a dumb question, but it is possible to store, and
Ok sorry this might seem like a dumb question but I cannot figure this
I am just starting out C++, so sorry if this is a dumb question.
Sorry if my question seems dumb. I've started using Eclipse Ganymede 3.4 this week
sorry this is probably a dumb question, but I want to make the background
Sorry if this is a dumb question but for the life of me I
I am sorry if this is a dumb question (cause it sounds unlikely). I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.