473,394 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How To Change A Web Page

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.

Feb 16 '06 #1
3 1202
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/d...le.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.

...


<pe*************@gmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
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.

Feb 16 '06 #2
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.

Feb 17 '06 #3
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.

Feb 17 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Irvin Amoraal | last post by:
I am new to javascript coding. I am using some javascript code to change an image on an html page. I would like the user to click on the image to bring them to another page. I need to change an...
4
by: Richard Cornford | last post by:
For the last couple of months I have been trying to get the next round of updates to the FAQ underway and been being thwarted by a heavy workload (the project I am working on has to be finished an...
7
by: Cliff Cavin | last post by:
How do I programatically change the background color of an aspx page in code? Is there something like Page.BgColor = "#FFFFFF" ? For that matter, how do I access any of the DOCUMENT...
7
by: Markus McGee | last post by:
Hi all, I have a quick question...I believe. On my web page, call it page A, I have a drop downlist with runat server enabled. When the drop downlist change event occurs it repopulates a...
3
by: Ken McCrory | last post by:
I have a web form page (.aspx) with 95 label controls that I now need to be text boxes. Is there an easy way to change those to what I want using something like a find and replace or am I stuck...
4
by: Shapper | last post by:
Hello, I have this image in my HTML code: <img src="images/en-US/myImage.jpg" /> I want to change the URL using the value of a Session variable. <img src="images/ Session("culture") Value...
3
by: John Smith | last post by:
I'm looking into this peace of code: protected void DropDown_SelectedIndexChanged(object sender, EventArgs e) { DropDownList list = (DropDownList)sender; TableCell cell = list.Parent as...
9
by: ad | last post by:
Hi, How can I dynamically change the MasterPager of a web page?
2
by: chadsmith76 | last post by:
Is there a way to access a string in the url with ajax and change a variable but not reload the page. I know you can do this for id's document.getElementById("page").value = page; but I...
4
by: David Lozzi | last post by:
Howdy, I have my master page, and I would like to change the background CSS class per the content page. Only the home page has a different background style, all other pages are using the same. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.