472,354 Members | 2,087 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,354 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 7596
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"...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...

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.