473,659 Members | 2,659 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Upload file using custom button

Is there a way to use a custom button with the:

<Input ID="MyFile" Type="File" RunAt="Server"> ?

This gives you a generic button, but I would like to use my own button that
has the same style as the other buttons I've created.

Is there an easy way to do this?

Thanks,

Tom
Nov 19 '05 #1
3 7665
tshad wrote:
Is there a way to use a custom button with the:

<Input ID="MyFile" Type="File" RunAt="Server"> ?

This gives you a generic button, but I would like to use my own button that
has the same style as the other buttons I've created.

Is there an easy way to do this?

Thanks,

Tom


A rather good in-depth discussion here. Check it out:

http://www.cs.tut.fi/~jkorpela/forms/file.html

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 19 '05 #2
Hi,

The textbox and button control will come as a single component and you
cannot change that. Even you cannot change the button's caption property from
"Browse" to any other string. Because that is the standard File control.
However you can apply styles to it and change the color, look, etc., In my
opinion, if you really want to change, I suggest positioning a div element
over the browse button by calculating the positions and hiding the browse
button, and then you have to figure out, how to raise the click event for the
browse button!

"tshad" wrote:
Is there a way to use a custom button with the:

<Input ID="MyFile" Type="File" RunAt="Server"> ?

This gives you a generic button, but I would like to use my own button that
has the same style as the other buttons I've created.

Is there an easy way to do this?

Thanks,

Tom

Nov 19 '05 #3
"Craig Deelsnyder" <cdeelsny@NO_SP AM_4_MEyahoo.co m> wrote in message
news:uM******** ******@TK2MSFTN GP10.phx.gbl...
tshad wrote:
Is there a way to use a custom button with the:

<Input ID="MyFile" Type="File" RunAt="Server"> ?

This gives you a generic button, but I would like to use my own button
that has the same style as the other buttons I've created.

Is there an easy way to do this?

Thanks,

Tom
A rather good in-depth discussion here. Check it out:

http://www.cs.tut.fi/~jkorpela/forms/file.html


Good article.

I think I will just use the button as done by the Browser and use a custom
button to actually download the file.

Thanks,

Tom
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
7195
by: Thomas Brooks | last post by:
Hi there.... I have an ASP routine that I'm writing which updates an Access database with a user name, the file name, etc. all done through parameter processing and SQL functions. I do not use any HTML form processing at all, i.e. <INPUT TYPE="FILE" etc...> processing. In actuality, I'm not using HTML at all. All is done with request.querystring and comparing these to database fields...
1
2549
by: TK | last post by:
I have a file upload control to allow a user to select/upload a file to the server. They need to upload x number of files in one shot because they have to confirm that they are uploading x number files for processing. So I do not want the files to be uploaded until the user presses a submit button verifying that they want to submit x number of files for processig (processing refers to me doing something to the files once uploaded). Catch...
2
1773
by: Brian Henry | last post by:
I am uploading a file from the file input box (textbox with a browse button) but when you tell the file to upload the client doesn't see anything happen until its done uploading... I'd love to provide some kind of visual feedback (an animated image or something while it happens to show its going, and at best a progress of the upload) is there anyway to do this in asp.net? thanks
4
4474
by: Matt Jensen | last post by:
Howdy I've got a rather strange issue occuring. I used forms based .NET authentication, although I'm also setting some session variables when people login. However, I've found when people use one of my webform pages which includes a button that pops up a window where you can upload files, if you upload files in this popup window, it seems to somehow clear out all of the session variables and the users get logged out. However, if...
0
2471
by: Raven Jones | last post by:
Heya all, I'm working on a web-based application (using ASP.NET and C# on .NET 1.1.4322, supporting only IE6 for Windows) that allows for file uploads. Screen real estate is at a premium, so I want to set its style to "display: none;" and interact only with the standard file upload dialog (which can be summoned by firing the click() method of the control). Attempting programmatic access of a file upload control is generally playing...
9
3824
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web site for a small club I belong to and one of the features I would like to include is the ability to allow users to upload image files. unfortunately the servers web root www folder only allows READ and EXECUTE permissions, which makes it...
1
2130
by: Marko Vuksanovic | last post by:
I used the following code for implementing a file upload progress indicator, using UpdateProgress Panel, though I have a problem that FileUpload.Has File always returns false. Any suggestions what might be wrong? FileUpload2.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="FileUpload2.aspx.cs" Inherits="FileUpload2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
4
9683
by: Marko Vuksanovic | last post by:
I am trying to cause the uplaod button, id="Upload",when clicked, to exectue the onClick event for Button1, id="Button1". <asp:FileUpload id="FileUpload" runat="server"> </asp:FileUpload> <asp:Button id="Upload" Text="Upload file" runat="server"> </asp:Button> <asp:Button id="Button1" OnClick="UploadButton_Click" runat="server" Visible="false"> in the code behind file I am using the following code to add the __doPostBack to the...
12
2482
by: GuangXiN | last post by:
I want the file upload element disappear, instead of it, I place a text box and a button with my own css defination. but it doesn't work on IE7. What should I do now? <form action="upload.php" method="POST" enctype="multipart/form-data"> <p> <span>Select photo:</span> <input type="file" name="photo" style="display:none;"> <input type="text" name="photoUrl" class="s1" /> <input type="button" class="s2"...
0
8427
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8746
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8525
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.