469,332 Members | 6,649 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,332 developers. It's quick & easy.

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 7469
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Thomas Brooks | last post: by
1 post views Thread by TK | last post: by
2 posts views Thread by Brian Henry | last post: by
9 posts views Thread by Wayne Smith | last post: by
1 post views Thread by Marko Vuksanovic | last post: by
4 posts views Thread by Marko Vuksanovic | last post: by
12 posts views Thread by GuangXiN | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.