Click here to Skip to main content
14,738,318 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,

It is my first time that I try the and I have a little issue. I declared a variable into the C# file (string UID, DB, PSW). I don't know how I could retrieve the content of that variable in an file and make use of them into my connectionstring as below :

<asp:SqlDataSource ID="MyDataSource1" runat="server"



       selectcommand="Select ID, REPERTOIRERECEPTION, STATUS From QUEUEOUT">

Any help ?

1 solution

Ok I found it :

MyDataSource1.ConnectionString = "Server=" + this.Schema + ";uid=" + this.UID + ";pwd=" + this.PSW + ";";

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900