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
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
Try using file style jquery plugin.
http://www.appelsiini.net/projects/filestyle
Here you can customize the textbox and file upload button also.
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.
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.