Author: a.ruzicka | Posted on: 8/3/2008 11:54:42 PM | Views : 309

Each user in my case has a special connection string (connects to different database), so I have to generate connection strings while program is already running (data for each user is stored database). Please, don't question this, I know why i do that.

But, how to write it correctly into ASP.NET? When I have connection string stored in Config, i would write ConnectionString="<%$ ConnectionStrings:IOFakeConnectionString %>", but i need something like ConnectionString="<%$ CallForMethodWhichReturnsActualConnectionString %>".

I don't want to change it at Page_Load, like this.SqlDataSource1.ConnectionString = GetConnStr();. This is not the way I want it to work. It should be in primar logic of application.
...

Go to the complete details ...