473,509 Members | 2,963 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Modify Login To Add Third Required Field

I've setup a test C#.NET web app that correctly uses Membership with the
Login, LoginView and LoginState controls in Visual Studio 2005. I've tested
it thoroughly and it all works as expected, with the User Name and Password.

Then I wanted to add a 3rd field called Department.

By converting the Login to a Template I was able to add the new ASP:Label,
ASP:Textbox and ASP:RequiredFieldValidator tags, and added custom code to
the Authenticate event, but I am not able to retrieve the information from
the new textbox.

I can see Login1.UserName and Login1.Password but not Login1.Department.
What am I missing? How do I get the contents of the new textbox into the
Authenticate event handler so I can do the checking?

Any help would be appreciated. Thank you.
Jul 20 '06 #1
1 1155
Andrew,
Probably the ASP.NET newsgroup would have been more appropriate for your
question. To do what you want, you would have to write a custom Membership
provider class, deriving from the base MembershipProvider in ASP.NET. Scott
Guthrie's blog points to some samples that are available.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Andrew Hayes" wrote:
I've setup a test C#.NET web app that correctly uses Membership with the
Login, LoginView and LoginState controls in Visual Studio 2005. I've tested
it thoroughly and it all works as expected, with the User Name and Password.

Then I wanted to add a 3rd field called Department.

By converting the Login to a Template I was able to add the new ASP:Label,
ASP:Textbox and ASP:RequiredFieldValidator tags, and added custom code to
the Authenticate event, but I am not able to retrieve the information from
the new textbox.

I can see Login1.UserName and Login1.Password but not Login1.Department.
What am I missing? How do I get the contents of the new textbox into the
Authenticate event handler so I can do the checking?

Any help would be appreciated. Thank you.
Jul 20 '06 #2

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

Similar topics

5
2958
by: Simon | last post by:
Hi, I have a Login.php page that logs the user in and out. I has two forms within the page, (depending on what we are trying to do), either one to log in or out. The form calls itself using a...
1
4511
by: EricRybarczyk | last post by:
I am starting a rewrite of an existing Classic ASP web site in ASP.NET 2.0. The existing ASP application has several types of users, each with a separate login process (separate login page,...
5
1907
by: Afshar | last post by:
Hi everybody there, I have a special Login page that wants users to enter 3 passwords rather than a single password. But can't do it with Login control. I tried following scenarios: 1. Put an...
14
4898
by: knal | last post by:
Hi there, I'm looking for a secure login script for a sort-of-community site... (PHP, MySQL, sessions, or maybe something else ... ) I know there are a lot of scripts out there, but none of them...
10
8133
by: Victor | last post by:
hi guys. In my project, now I am using a asp.net login control and a customized membership provider to do the form authentication. Now I want some function that user can skip the login form and be...
2
1921
by: dylanhughes | last post by:
I'm looking for an example of a login system that has multiple fields (2 to be exact) + password. e.g username, company name and password, the user, company and password are checked against a mysql...
2
4510
by: antonyliu2002 | last post by:
I am testing ASP.NET 2.0 Forms athentication with user credentials in SQL Server 2005. I don't want to put user credentials in web.config, so the credentials section is commented out. The...
5
3689
by: Mai Le | last post by:
Hello Experts. Coul you please help me to fix my program. I created a login from with 2 levels. Admin an User. If Admin login will open A form and If User login will open B form I had table...
3
6207
by: satishknight | last post by:
Hi, Can some one tell me how to change the validation sequence for the code pasted below, actually what I want it when any one enters the wrong login information (already registered users) then it...
0
7234
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7412
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
7505
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...
0
5652
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3216
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
441
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.