Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8148369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:38:04+00:00 2026-06-06T14:38:04+00:00

I encountered an error. Despite declaring the variables (failturetext and userName) errors still appear.

  • 0

I encountered an error. Despite declaring the variables (failturetext and userName) errors still appear. Can anyone please help me?

- Use of Unassigned local variable "FailureText" 
- Use of Unassigned local variable "UserName"


protected void Login1_LoginError(object sender, System.EventArgs e)
{
    TextBox FailureText;
    TextBox UserName; 

    //There was a problem logging in the user
    //See if this user exists in the database
    MembershipUser userInfo = Membership.GetUser(UserName.Text); // errors appear here
    if (userInfo == null)
    {
        //The user entered an invalid username...
        //error appear here ( failuretext.text) 
        FailureText.Text = "There is no user in the database with the username " + UserName.Text;  
    }

Thanks (:

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T14:38:05+00:00Added an answer on June 6, 2026 at 2:38 pm

    You’ve declared the variables, but you haven’t assigned anything to them before you are attempting to reference their properties. That’s the origin of the messages. You’ve got bigger problems, though, because those represent UI controls and it’s highly unlikely that they should be local variables in your function. They probably ought to belong to the page (or form) rather than be declared locally.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anyone encountered this error before when trying to access the photo library using the
Has anyone encountered this error using SQL Server 2005 and Data access application blocks
I've encountered this error while trying to use the url tag to link to
I have encountered a strange error. I use Windows 7 x64. Visual Studio 2010
I have often encountered an error such as cannot convert from 'method group' to
I have encountered this error when trying to delete a cell, using a custom
Hi I have just started learning WCF and I have encountered an error I
$banana=0; $view = mysql_query('SELECT ......') or die ('Encountered an error.') ; while($rows3=mysql_fetch_array($view)) { $total_price2=$rows3['qty']*$rows3['number'];
I encountered the following error whilst running bundle install with ruby-debug19 in my Gemfile:
A PHP Error was encountered Severity: Notice Message: Uninitialized string offset: 0 Filename: index.php

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.