首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

一个关于swfupload的有关问题

2012-09-15 
一个关于swfupload的问题第一次用swfupload ,照着网上的教程把swfupload.js、handlers.js、default.css等文

一个关于swfupload的问题
第一次用swfupload ,照着网上的教程把swfupload.js、handlers.js、default.css等文件复制到相关目录,然后在default.aspx的<head>里添加swfupload.js等文件,在default.aspx.cs的page_load里加上 Session.Clear(); 但是到这步就运行出错了。请问还我还有什么没有做的吗?

下面是default.aspx的内容:

C# code
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %><!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 runat="server"><link href="css/main.css"    rel="stylesheet" type="text/css" />    <title></title><link href="css/default.css" rel="stylesheet" type="text/css" />     <script type="text/javascript" src="swfupload/swfupload.js"></script><script type="text/javascript" src="js/handlers.js"></script>    <script type="text/javascript">        var swfu;        window.onload = function () {            swfu = new SWFUpload({                // Backend Settings                upload_url: "upload.aspx",                post_params : {                    "ASPSESSID" : "<%=Session.SessionID %>"                },                // File Upload Settings                file_size_limit : "2 MB",                file_types : "*.jpg",                file_types_description : "JPG Images",                file_upload_limit : "0",    // Zero means unlimited                // Event Handler Settings - these functions as defined in Handlers.js                //  The handlers are not part of SWFUpload but are part of my website and control how                //  my website reacts to the SWFUpload events.                file_queue_error_handler : fileQueueError,                file_dialog_complete_handler : fileDialogComplete,                upload_progress_handler : uploadProgress,                upload_error_handler : uploadError,                upload_success_handler : uploadSuccess,                upload_complete_handler : uploadComplete,                // Button settings                button_image_url : "images/XPButtonNoText_160x22.png",                button_placeholder_id : "spanButtonPlaceholder",                button_width: 160,                button_height: 22,                button_text : '<span class="button">选择图片 <span class="buttonSmall">(最大2M)</span></span>',                button_text_style : '.button { font-family: Helvetica, Arial, sans-serif; font-size: 14pt; } .buttonSmall { font-size: 10pt; }',                button_text_top_padding: 1,                button_text_left_padding: 5,                // Flash Settings                flash_url : "swfupload/swfupload.swf",    // Relative to this file                custom_settings : {                    upload_target : "divFileProgressContainer"                },                // Debug Settings                debug: false            });        }    </script></head><body>    <form id="form1" runat="server">    <div style="margin:0 auto;">            <asp:DataList ID="DataList1" runat="server"  RepeatColumns="4">                        <ItemTemplate>                      <div style="color:Gray;text-align:center;height:20px;">                <asp:LinkButton ID="viewpics" CommandName="pids" CommandArgument='<%# Eval("pid")%>' Text='<%# Eval("albumname")%>' runat="server"></asp:LinkButton></div>             <div class="speciaIn">             <img src="images/def.gif" alt="d" title="dff" />             <div >                          </div>                          </div>            <div style="color:Gray;text-align:center;height:20px;">                   共<%# Eval("crowCounts")%>张相片&nbsp;&nbsp;&nbsp;&nbsp;                  <asp:LinkButton ID="LinkButton1" runat="server" Font-Underline="false" Font-Size="Small">删除</asp:LinkButton>                        </div>                   </ItemTemplate>                </asp:DataList>            <br />                <asp:LinkButton ID="PrevPage" runat="server" onclick="PrevPage_Click">上一页</asp:LinkButton>&nbsp;&nbsp;&nbsp;        <asp:LinkButton ID="NextPage" runat="server" onclick="NextPage_Click">下一页</asp:LinkButton>        &nbsp;当前第<asp:Label ID="CurrentPageText" runat="server"></asp:Label>        页&nbsp; 共<asp:Label ID="All" runat="server"></asp:Label>        页&nbsp; 跳转到         <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true"            onselectedindexchanged="DropDownList1_SelectedIndexChanged">        </asp:DropDownList>        页       <br />        </div>    </form>            <div>       <div>            <button id="btnBrowse" type="button" style="padding: 5px;" onclick="swfu.selectFiles(); this.blur();">         <img src="images/page_white_add.png" style="padding-right: 3px; vertical-align: bottom;" alt="Add Icon" />         Select Images <span style="font-size: 7pt;">(2 MB Max)</span></button>               </div>    </div></body></html> 






[解决办法]
帮顶.
[解决办法]
up

热点排行