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

Excel Sort values in ascending order using function TEXTJOIN

 Excel ::  Text ::  1,3,5,2,9,5,11 Result :: 1,2,3,5,5,9,11 Formula ::     TEXTJOIN ( ",",1,SORT(MID(SUBSTITUTE( A1 ,","...