Solved

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

Posted on 2016-11-09
1
38 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 17

Accepted Solution

by:
Pawan Kumar Khowal earned 500 total points
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Penetration Testing O365 to/from Azure .Net Services 4 36
Problem to picture file 3 37
ASP Focus problem 3 26
Hovering effect 9 28
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
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/…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 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

10 Experts available now in Live!

Get 1:1 Help Now