Solved

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

Posted on 2016-11-09
1
69 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
1 Comment
 
LVL 24

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

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…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now