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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:22:39+00:00 2026-06-17T12:22:39+00:00

I have an asp.net page with a FileUpload control so that the user can

  • 0

I have an asp.net page with a FileUpload control so that the user can browse to select a file. I wanted to assign a default value so the user doesn’t need to browse unless they’re doing something out of the norm, but the File properties are read-only.

So I set the Visible property of the FileUpload control to false and put in a textbox and button. In that textbox I put the default path I want. When the user clicks the button I want it to open the Browse window that clicking the FileUpload control would. I have this:

<head>
    <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR"/>
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE"/>
<meta content="JavaScript" name="vs_defaultClientScript"/>
<meta content="http://schemas.microsoft.com/intellisense/ie5"name="vs_targetSchema"/>   

<script src="common.js" type="text/javascript"></script>

    <script type="text/javascript">
        function fileBrowse()
        {
            document.getElementById('FileBrowse').click();
        }
    </script>

</head>

And then in the code I have this:

Protected Overrides Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    MyBase.Page_Load(sender, e)

    Me.btnINI.Attributes.Add("onclick", "javascript:fileBrowse();")
End Sub

FileBrowse is the name of the FileUpload control on the page. btnINI is the name of the button that I want to launch the browse.

When I click the button nothing happens – no errors, nothing is launched. Any help would be much appreciated!

  • 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-17T12:22:40+00:00Added an answer on June 17, 2026 at 12:22 pm

    My guess is the id is not correct. Try passing the ClientID of FileBrowser control to the javascript function as a parameter.
    Also, check if the function is actually called with an alert box.

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

Sidebar

Related Questions

I have a simple ASP.NET page that users can browse to, select a file
I have an ASP.NET MVC web page that has a file upload control. Under
I have a FileUpload Control and a image control on asp.net page as follows
I have a web page where i have an ASP.NET file upload control to
I have a simple ASP .Net file upload control on a page. I have
I have FileUpload control on my ASP.NET page and Image control where I show
I have an asp.net page having a wizard control. I wanted to make visible
I have an ASP.Net Page, aspx with its default form. I have a Submit
I have an ASP.NET page where I am showing products in a Gridview control.
With ASP.NET MVC3 (Razor) I have a simple page that loads a jQuery UI

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.