Web Forms Connection String


Author
Message
Ross L Rooker, Sr.(1)
Ross L Rooker, Sr.(1)
StrataFrame User (220 reputation)StrataFrame User (220 reputation)StrataFrame User (220 reputation)StrataFrame User (220 reputation)StrataFrame User (220 reputation)StrataFrame User (220 reputation)StrataFrame User (220 reputation)StrataFrame User (220 reputation)StrataFrame User (220 reputation)
Group: StrataFrame Users
Posts: 50, Visits: 163
I have this defined in the Global.asax in Application_Start method:

DataLayer.DataSources.Add(new SqlDataSourceItem("", "server=111.111.111.111;User ID=xxxxxxxx;Password=xxxxxxxx;database=XXXdata"));

My question is how do I access this connection string value if required in a form within the web application.
Ross L Rooker, Sr.(1)
Ross L Rooker, Sr.(1)
StrataFrame User (220 reputation)StrataFrame User (220 reputation)StrataFrame User (220 reputation)StrataFrame User (220 reputation)StrataFrame User (220 reputation)StrataFrame User (220 reputation)StrataFrame User (220 reputation)StrataFrame User (220 reputation)StrataFrame User (220 reputation)
Group: StrataFrame Users
Posts: 50, Visits: 163
Figured it out:




MicroFour.StrataFrame.Data.DataLayer.DataSources[0].ConnectionString.ToString()
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search