In asp.net 4.0 c#, i have two databases on different servers 1.Sql server 2.Oracle
I want to develop a web application in which the users will login with their id password and then perform the allowed tasks.
I want to know that how i can make a single connection string for multiple users? I dont want to make connection string on every page.
I was looking for this for a whole day but could not found any solution. currently i am not using web.config file but i have a class where i have made a connection string and passed the textbox values to it and the storing them in static fields and suppling them to other classes , but i dont think it is good approach
i think most of people are not getting what i really want to ask kindly let me know if you want any confirmation.
for example there are 40 users each having a different id,password (no of users can be increased or decreased) there are two approaches to have a connection string 1)make a connection string in a class string conn=@"server=MYSERVER;database=mydb;user id="+userid+";password="+password); but how the userid,password fields can be accessed in web.config? here userid=textbox1.text,,password=textbox2.text;
2)make a connection string in a web.config file so how?