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 1107639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:57:59+00:00 2026-05-17T01:57:59+00:00

I want to be able to quickly create some simple ASP.NET reports that don’t

  • 0

I want to be able to quickly create some simple ASP.NET reports that don’t have a code behind file. Each report will be an aspx file that may have multiple SqlDataSource controls on it. I want to be able to use the <%$ ConnectionStrings:MyTag %> syntax to set the connection string but, the application we’re using has the actual connection string in a separate config file that is referenced in the web.config by using configSource=”App_Data\database.config”.

In code behind, I can programmatically access the ConnectionString using:
ConfigurationManager.ConnectionStrings[“AbleCommerce”].ConnectionString

But how do we set the connection string without using a code behind?

  • 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-05-17T01:58:00+00:00Added an answer on May 17, 2026 at 1:58 am

    You’ve aluded to the answer in your question, if your connection string is defined in an external file I’m guessing the contents of that file will look like:

    <connectionStrings>
        <add name="AbleCommerce" 
            connectionString="..." 
            providerName="System.Data.SqlClient" />
    </connectionStrings>
    

    You would reference this in your aspx page by using

    <asp:sqldatasource id="SqlDataSource1" runat="server" 
        connectionstring="<%$ ConnectionStrings:AbleCommerce %>" 
        selectcommand="SELECT * FROM [tProducts]"></asp:sqldatasource>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to be able to quickly deploy updates to a site that is
I want to be able to capture the exception that is thrown when a
I want to be able to make an HTTP call updating some select boxes
I want to be able to get an estimate of how much code &
I want to be able to get an estimate of how much code &
I'm using tables in my document, and I want to be able to have
I want to be able to easily and quickly delete an array of needles
I have created a template in Word 2007 with several fields that I want
I have a project where I need to create a desktop app that acts
I have some code within struts.xml like: <action name=viewApplicationPDF class=com.xxx.abc.web.action.XApplicationPDFAction> <result name=success>/WEB-INF/templates/xApplication.jsp</result> </action> 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.