Friday, 25 September 2015

Show browser file or input type=file show only button in asp.net or HTML


//CSS

input[type=file] {
position: absolute;
border: solid transparent;
border-width: 0 0 0px 0px;
opacity: 0.0;
filter: alpha(opacity = 0);
}
.filebutton {
position: relative;
cursor: pointer;
text-align: center;
}
.filebutton span {
text-align: center;
padding: 2px 6px 3px;
background: #eac380 -moz-linear-gradient(center top , #eac380 5%, #fae4bd 100%) repeat scroll 0 0;
display: inline-block;

}

// HTML Controls

<label class=" filebutton">
   <span>Add Files</span>
   <input type="file" id="files" name="file"></input>
</label>

// Asp.net Controls

                               <label class="filebutton">
                                  <span>Browse...</span>
                                  <asp:FileUpload ID="FileUpload1" runat="server"/>
                              </label>

No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...