How To Change A Web Page

P

peter.mcclymont

Hi All,

I am new to ASP .NET, and have managed to add an asp:login control onto
my web page which hooks into a MSSQL database.

I can enter user names and passwords into the login control (this will
be the first page of my web site to authenticate the user), but then I
am a bit stuck.

All I would like to do is intercept the 'OnLoggedIn' event (which
occurs when the user clicks OK with a correct user name and password),
and in my C# code change to my next web page which is going to be the
start of the main site. Cannot work out the code to change to the next
web page.

Thanks, Peter.
 
S

sloan

You're close, but barking up the wrong tree.

If you drag a asp:login control onto your form ... you're saying "I want to
use a Membership Provider".

Asp.Net 2.0 comes with a default MProvider. Which you're aware of, because
you're trying to override on of the events.

You actually need to switch gears....
http://www.dotnetbips.com/articles/displayarticle.aspx?id=494

And implement a custom MemberShip Provider.... which hooks into your MYSQL
database.

Basically, you'll inherit from the abstract class..... and then you have to
put in the web.config that you're using the "non standard" Membership
Provider.

...
 
P

peter.mcclymont

Not quite sure I follow, what difference is implementing a custom
membership provider going to make?

I just want the web page to change to another page when the user has
sucessfully logged in.

New to ASP, so I am still a bit confused.

Thanks for your help.
 
P

peter.mcclymont

I think I have stumbled across the answer.

All you do is have a page called login.aspx with the login fields, and
a page called default.aspx which is the first page after you have
logged in.

It seems to work automatically like that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top