Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2006-11-08
2
230 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 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