asp.net批量上传图片 - .NET技术 / ASP.NET
asp.net批量上传图片最好有源码,在线等!!!!!!!
源码很长的。
参考
C# code:
HttpFileCollection files = HttpContext.Current.Request.Files;
if (files.Count <= 1)
{
Page.ClientScript.RegisterClientScriptBlock(GetType(), "", "<script>alert('请添加图片附件!'); hideWaitLayer();</script>");
}
else
{
try
{
for (int i = 0; i < files.Count; i++)
{
HttpPostedFile postedFile = files[i];
string filepath = System.IO.Path.GetFileName(postedFile.FileName);//获取文件名
if (filepath != "")
{
string fileName = filepath.Substring(filepath.LastIndexOf("\\") + 1);
string fileExtensions = fileName.Substring(fileName.LastIndexOf(".") + 1);//获取后缀名
//避免一次上传多个造成命名重复,特此再时间后再加一个序号,考虑到用户量不会很大,更大的并发操作在这里不考虑
string newFileName = DateTime.Now.ToString("yyyyMMddHHmmss") + i + "." + fileExtensions;
string serverPath = Server.MapPath("../Adjunct/ImagesNews/" + newFileName);
相关问答:
http://www.zgjhjy.com/Test/PrimaryTest/Index.aspx
就是类似以上的在线测试系统,需要有一个后台的,语言是asp的,数据库是access的,还需要能在后台对信息进行添删改查的。谢谢各位了。。。
程序真的很多,不知 ......
有一个类
class adc
{
dim a,b,c
}
如何在另外一个类中取得类成员及成员个数
class getmenber
{
dim menbers()
function getmenbers(resclass)
'res为一未知类
'getmenber ......
function CheckOpwd(){//验证用户名
var pwd=document.all.txtOpwd;
var div1=document.getElementById("divPwd");
if (pwd.value=="")
{
......
C# code:
SqlConnection conn = CsDB.sqlcon();
SqlDataAdapter da = new SqlDataAdapter("select fwCoding from bjmuma_fwCoding where OrderNumber='" + Order + & ......
3个radioButton
一个Button
一个label
C# code:
protected void Button1_Click(object sender, EventArgs e)
{
string str = null;
RadioButton rdo=(RadioButton)sender;
......