Solved

How to access value from login control txtbox asp.net 2

Posted on 2006-11-08
2
228 Views
Last Modified: 2010-07-27
ASP.NET 2
Visual Studio 2005
win xp

Hi I want to retrieve the username from the login control txtbox when a user logs on
and store in a variable.

tried  

Dim username As String
        username = Login1.FindControl("UserName")

but get following error

Error      2      Value of type 'System.Web.UI.Control' cannot be converted to 'String'.      

D
0
Comment
Question by:deNZity
2 Comments
 
LVL 9

Accepted Solution

by:
kraffay earned 500 total points
ID: 17902748
Try this:

username = Login1.UserName
0
 

Author Comment

by:deNZity
ID: 17903039
thanks :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now