2

I have a FileUpload Control in my website and now I need to add Watermark text on it but didn't get any success.

I tried both AJAX TextWaterMarkExtender and Placeholder property but still not working.

Can any one give a solution..??

Thanks

Charles
  • 50,943
  • 13
  • 104
  • 142
Vishal Suthar
  • 17,013
  • 3
  • 59
  • 105
  • See this post: [Set watermark on an image and save it in an original quality](http://stackoverflow.com/questions/7782844/set-watermark-on-an-image-and-save-it-in-an-original-quality) It might help you. – Ahsan Khurshid Sep 27 '12 at 05:56
  • Aahh Bounty,,,,,,,,, ;) Here is the below answer from my side... – Jigar Pandya Sep 27 '12 at 06:47
  • I don't understand, watermark in the text file , image file or anywhere else? – zinking Oct 04 '12 at 03:30

4 Answers4

2

Here is the link: File Upload with Placeholder property

file upload

Brijesh Gandhi
  • 560
  • 2
  • 10
  • 27
0

Try using file style jquery plugin.
http://www.appelsiini.net/projects/filestyle
Here you can customize the textbox and file upload button also.

ravidev
  • 2,708
  • 6
  • 26
  • 42
0

I think you cant do it Jigar Pandaya is right in your explanation. I see three possibilities

1 - Use a JS plugin (easy to do and resolve your problem) 2 - Use a third part control (easy to do and resolve your problem). 3 - Develop your Upload Control (easy, but with much more effort).

in my opinion, option 1 and 2 are better.

Ewerton
  • 4,046
  • 4
  • 30
  • 56
-1

Well File-upload control or any HTML File Upload controls are always hard to modify Because of the efforts of browsers to minimize the attack surface, most of the CSS properties we usually use to style form controls don’t have any effect.

TO provide Watermark is not possible as you can not give text over there. (again do to security of browser control with modern browsers)

And the watermark stuff that you think contains ajax would not be applied on the ASP:UploadCOntrol,

However from your question I understand you want to give user a better visualization when they upload anything.

There are two ways' one is to use custom CSS property and apply it to control.

<style id="cssStyle" type="text/css" media="all">
.CS
{
background-color:#AB00CC;
color: Red;
border: 5px solid #AB00CC;
font: Verdana 10px;
padding: 1px 4px;
font-family: Palatino Linotype, Arial, Helvetica, sans-serif;

}
</style>

<asp:FileUpload ID="FileUpload1" CssClass="CS" runat="server" />
Or
<input id="readFile" type="file" class="CS" runat="server" />

Another pretty good example is given here; and you can check this like to do the same. Above will allow you to product something like given image.enter image description here

Jigar Pandya
  • 6,004
  • 2
  • 27
  • 45
  • i think this solution only styles the input, he wants to add a watermark, the watermark text should not be recognized as a file Path. – Ewerton Oct 03 '12 at 17:37