• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

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

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
deNZity
Asked:
deNZity
1 Solution
 
kraffayCommented:
Try this:

username = Login1.UserName
0
 
deNZityAuthor Commented:
thanks :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now