473,396 Members | 2,082 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 7647
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_SPAM_4_MEyahoo.com> wrote in message
news:uM**************@TK2MSFTNGP10.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
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...
1
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...
2
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...
4
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...
0
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...
9
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...
1
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...
4
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>...
12
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"...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...
0
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,...

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.