Solved

why  do we need to add dollar sign  on asp datasource tag <% $  ConnectionStirngs : Con %>

Posted on 2016-11-09
1
92 Views
Last Modified: 2016-11-12
Hi experts ,

Why the dollar symbol is needed on ASP- SqlDatasource tag and whats the use of it


<asp:SqlDataSource ID="Dropdown" runat="server" ConnectionString="<%$ ConnectionStrings:godaddyConnectionString %>" SelectCommand="select [Name] from [agent]"></asp:SqlDataSource>

Open in new window


Otherwise throws error as
Format of the initialization string does not conform to specification starting at index 0

Thanks Experts
0
Comment
Question by:karthik80c
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 28

Accepted Solution

by:
Pawan Kumar earned 500 total points
ID: 41880486
Try.-

1. The dollar sign ($) indicates to ASP.NET that the following expression is an expression builder.  Syntax of the expression builder:

<%$ Expression Prefix: Expression Value %>

2. The expression prefix defines the kind of expression, such as AppSettings, ConnectionStrings, or Resources.

Below URL will definitely explain you the things in details- <<Check the 4th Section>>

https://support.microsoft.com/en-us/kb/976112

Hope it helps !!
1

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question