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 6805025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:32:14+00:00 2026-05-26T19:32:14+00:00

I created a LoginView in order to keep one button hidden from normal users,

  • 0

I created a LoginView in order to keep one button hidden from normal users, i.e not admins.
Works great but when I tried to add two more buttons – FileUploadControl and Upload button, I get an error that FileUpload1 does not exist. It definitely exists and I don’t get why it complains…

Do I need another LoginView or how can I do it?

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-05-26T19:32:14+00:00Added an answer on May 26, 2026 at 7:32 pm

    I suspect that you are trying to access the controls directly from the code behind as you would naturally do.

    e.g.

    On the .aspx page

    <asp:FileUpload id="fileUpload1" runat="server" />
    

    In the code behind

     string fileName = fileUploadl.FileName;
    

    However, you cannot access controls directly when they are within the LoginView. You need to do the following. So if you had the control like this.

    <asp:LoginView id="LoginView1" runat="server">
        <AnonymousTemplate>
            <asp:FileUpload ID="fileUpload1" runat="server" />
        </AnonymousTemplate>
    </asp:LoginView>
    

    You can access the fileUpload1 control like this

     FileUpload fileUpload1 = (FileUpload) LoginView1.FindControl("fileUpload1");
    

    Then you can access the fileUpload1 properties.

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

Sidebar

Related Questions

Created .NET WCF service, tested it - works. Generated schemas from Data and service
I created a login view for my Employee controller , but when the login
Created new scaffold Users that has fields name & description All working as suppose
I am using FluentValidation to validate my models, and it works awesome. One question
Created a new App, created a new Fanpage for this App but if i
I try to load a loginView in my app delegate but it only shows
I've created a project from the master detail template in Xcode 4.2/iOS5. I am
I created a new View (LogView) in Infrastructure.Module project. This view will be used
I created a program using dev-cpp and wxwidgets which solves a puzzle. The user
I created a few mediawiki custom tags, using the guide found here http://www.mediawiki.org/wiki/Manual:Tag_extensions I

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.