本帖最后由 wyjhm 于 2014-05-26 09:49:07 编辑

解决方案 »

  1.   

    就是啊,LZ说的要求不是就fileupload的默认样式吗?
    修改样式的最好方法,就是把fileupload隐藏了,自定义一个上传界面,点击你自定义的上传按钮触发fileupload 的 chanage事件即可
      

  2.   

    最终的解析还是 input type=‘file’所以你完全可以模拟,自定义样式,如下
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <style>
    input{float:left;margin:0;padding:0;background:none;border:none; }
    .upload{ width:300px;height:40px;line-height:40px;position:relative;font-size:18px; overflow:hidden;}
    .upload .text{width:220px;border:solid 1px #ccc;height:22px;line-height:22px;}
    .upload .file{position:absolute;top:0;right:0;width:100%;height:24px;border:solid 1px #ccc;opacity:0;filter:alpha(opacity=0);cursor:pointer;}
    .upload span{float:right;width:60px;height:24px;line-height:24px;background:#09C;color:#fff; text-align:center;cursor:pointer; border-radius:5px; }
    </style>
    </head><body>
    <div class="upload">
    <input type="text" class="text" id="txtfile"/>
        <span>上传</span>
        <input type="file" class="file" onchange="document.getElementById('txtfile').value=this.value;"/>
    </div>
    </body>
    </html>
      

  3.   


    我后天 要获取 她的 路径,名称,怎么获取
    我在后台 如何 获取   路径名称
    HttpPostedFile file = Request.Files[0];
      

  4.   

    可以试试uploadifly插件,这个可以将文件上传显示成一个button的样式,你可以在界面上放一个文本框专门显示这个上传文件的路径,这样你想要的效果就可以达到了