473,667 Members | 2,589 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:RequiredFie ldValidator 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.Departme nt.
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 1160
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 MembershipProvi der 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:RequiredFie ldValidator 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.Departme nt.
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
2964
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 post method and either logs the user in our out given the information from the form. but every pages use sessions and cookies, if the user is successfully logged in then the cookies and session values are updated, (as well as MySQL).
1
4528
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, separate DB tables, etc). For one of these user types, the current application has an additional input field required for login… they have a username, password, and another “location code” field. Please don’t make me explain or justify this…...
5
1913
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 Login in the page and set its Visible = False instead put my own username and 3 password on the form. Then I checked 2nd and 3rd password seperately and passed username and password to Login control via its Username and Password properties but...
14
4911
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 really seem secure, or have other kind of flaws (like IP based login etc.). Why i'm asking here, is because there's experience out there, and i hope experience can tell me what my best shot is. I'm aware that i will very probably have to do...
10
8149
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 authenticated and login the system automatically base on the username and password already in the session. Is that possible to do ? and how to do it? Cheers Victor
2
1930
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 database. I have it working with just the username field but I'm confused on how to go about adding another field. I'm pretty new to PHP so don't beat me up too much for this example code, I borrowed and hacked it together in a very short period...
2
4516
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 following is the relevant part in my web.config. <authentication mode="Forms"> <forms name=".MyWebAppAuth" path="/" loginUrl="Default.aspx" protection="All"
5
3698
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 tblAdmins EmpID EmpName EmpPassword
3
6219
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 has to tell then them its wrong information but currently it takes then to a next page and then tells them its incorrect information. This is tedious as every time they enter wrong they will be redirected to a different page and then they have to...
0
8457
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8365
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8883
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8646
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7390
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6203
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 presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2776
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 we have to send another system
2
1778
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.