I need to change a gridview datasource/connectionstring based on session parameter/login.
Just a little background, we have an in-house software that generates an .mdb database file and then uploads it to our hosted database-driven website via FTP. Each of our customers get their own .mdb file and a login to the website. The website is designed to show only their assigned .mdb. But the website has limited capabilities.
So I was tasked to update the website and found out that it uses .asp, but I am not well versed in VB script and found that creating an .aspx web application is easier.
Now I'm developing a web application in Visual Studio that utilizes the same database but with added features such as sorting, paging, and filtering based on keyword searches.
I've finished creating the login part (with sessions), and I've been able to create a page that displays data on a gridview. My problem now is that I don't really know how to change the gridview datasource based on login/session.
By the way, the database for login information is also an .mdb and is also uploaded by our in-house software. If we need to add new users, we use the in-house software to update the .mdb and then upload it to the website. There are 3 columns in the database table, username, password, and client code. I would like to use the client code to pull the correct database file because each of the database files contain a specific client code already.
Please assist. Thanks!