0

Hi,

I have created an MS Access table to store Usernames and Passwords plus other information.

I have just started to play around with ASP.NET and am trying to have a situation where a user is required to login to view an image gallery that is run in Flash.

At the Login page the user would type in the username and password, if that is correct I would do another query to grab some param code that is in another column that's part of the users record that I would store as a variable to be passed into the Flash slideshow as a param. Then it loads a particular gallery that only that person can see.

I have this working in classic ASP and would like to have this working on ASP.NET ver 3.5 (my ISP is not on 4.0 yet)

Do I add the connection details in the web.config (root)?
The query to check the credentials in the code behind for the Login page?

Is it a case that I can grab my original code from Classic ASP and drop it into the code behind.
Also my other question, should I use C# or VB, what is the prefered route?

I'm not really after roles or memberships and I have looked at the asp.net conf manager which I dont think helps me. But cookies would be good also.

If you have any code examples or point me in a direction that I could learn from it would be greatly appreciated.

Many thanks

Rob.

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by RobM_01
0

Yes you can add the connection string and other application level settings in Web.config file of asp.net.

I suggest use C#.

Regarding your query for credentials...You can write query like below
"Select Count(*) From yourtablename Where UserName = 'textbox1.Text' And Password='txtbox2.Text'"

Also try to use Role management at your own end by designing database and coding because if you are going with membership than it's bit hard to customize as per your requirement.

Hi,

I have created an MS Access table to store Usernames and Passwords plus other information.

I have just started to play around with ASP.NET and am trying to have a situation where a user is required to login to view an image gallery that is run in Flash.

At the Login page the user would type in the username and password, if that is correct I would do another query to grab some param code that is in another column that's part of the users record that I would store as a variable to be passed into the Flash slideshow as a param. Then it loads a particular gallery that only that person can see.

I have this working in classic ASP and would like to have this working on ASP.NET ver 3.5 (my ISP is not on 4.0 yet)

Do I add the connection details in the web.config (root)?
The query to check the credentials in the code behind for the Login page?

Is it a case that I can grab my original code from Classic ASP and drop it into the code behind.
Also my other question, should I use C# or VB, what is the prefered route?

I'm not really after roles or memberships and I have looked at the asp.net conf manager which I dont think helps me. But cookies would be good also.

If you have any code examples or point me in a direction that I could learn from it would be greatly appreciated.

Many thanks

Rob.

0

Yes you can add the connection string and other application level settings in Web.config file of asp.net.

I suggest use C#.

Regarding your query for credentials...You can write query like below
"Select Count(*) From yourtablename Where UserName = 'textbox1.Text' And Password='txtbox2.Text'"

Also try to use Role management at your own end by designing database and coding because if you are going with membership than it's bit hard to customize as per your requirement.

thanks for your reply / suggestions

I have created an ASPDOTNET.MDF database via the asp.net config manager and created some users and roles.

I also need to store other information about the users so I created another table called UserDetails where I have the following columns:

UserID uniqueidentifier allow nulls false
FirstName varchar(50) allow nulls false
LastName varchar(50) allow nulls false
GalleryLink varchar(MAX) allow nulls false

How do I go about including these fields when I add a new user to the database?

Cheers Rob.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.