Solved

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

Posted on 2016-11-09
1
85 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 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

856 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