孟子e章:请帮忙解决改动<在ASP.NET中实现多文件上传>中出现的问题
原文出处:http://dotnet.aspx.cc/article/58EA3515-36F2-4FD9-AC89-EAF49F59816C/read.aspx
我想改动为:页面中可以选择上传文字或图片到指定图据库中,那么当点击图片上传后,如果重新选择上传文字,上次上传的图片也会再次上传。
我把我的源程试过一次,只要刷新页面,就是重复上传,就问有没有办法改进这个办法。同时我也向你的信箱发了一封信,肯求解决。最好你把加我QQ,帮我解决一下这个问题。谢谢
我把界面试设计部分贴出来吧,希望你能理解我的用意。
<%@ 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 ">
<title> 无标题页 </title>
<script language= "JavaScript ">
function addFile()
{
var str = ' <br> <INPUT type= "file " size= "50 " NAME= "File "> '
document.getElementById( 'Panel1 ').insertAdjacentHTML( "beforeEnd ",str)
}
</script>
</head>
<body style= "text-align:center; ">
<form id= "form1 " runat= "server " enctype= "multipart/form-data ">
<div>
<table border= "0 " width= "750 ">
<tr>
<td align= "left "> 所属类别 </td>
<td width= "250px ">
<asp:DropDownList ID= "ddlCategory " runat= "server " Width= "250px " DataTextField= "CategoryName " DataValueField= "CategoryID " OnSelectedIndexChanged= "ddlCategory_SelectedIndexChanged " AutoPostBack= "true ">
</asp:DropDownList> </td>
<td> 小说名称 </td>
<td style= "width: 250px ">
<asp:DropDownList ID= "ddlBookName " runat= "server " Width= "250px " DataTextField= "BookName " DataValueField= "BookID ">
</asp:DropDownList> </td>
&