elimino test.aspx
aggiunta img gif corretta git-svn-id: https://keyhammer.ath.cx/svn/ETS/trunk@15 72332f79-082b-4ce8-9953-5b7f197a49bb
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="ETS_WS.test" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div>
|
||||
<asp:ScriptManager ID="ScriptManager1" runat="server">
|
||||
</asp:ScriptManager>
|
||||
<asp:Image ID="imgCarica" runat="server" ImageUrl="~/images/favicon.png" Visible="false" />
|
||||
<asp:AjaxFileUpload ID="AjaxFileUpload1" runat="server" ThrobberID="imgCarica" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,40 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.IO;
|
||||
using NLog;
|
||||
|
||||
namespace ETS_WS
|
||||
{
|
||||
public partial class test : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
AjaxFileUpload1.UploadComplete += new EventHandler<AjaxControlToolkit.AjaxFileUploadEventArgs>(AjaxFileUpload1_UploadComplete);
|
||||
}
|
||||
/// <summary>
|
||||
/// completamento caricamento
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void AjaxFileUpload1_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
|
||||
{
|
||||
Logger lg = LogManager.GetCurrentClassLogger();
|
||||
// salvo!
|
||||
string path = "";
|
||||
try
|
||||
{
|
||||
path = MapPath("~/TempUploads/") + Path.GetFileName(e.FileName);
|
||||
AjaxFileUpload1.SaveAs(path);
|
||||
lg.Info("salvato file: {0}, {1} Kb", e.FileName, e.FileSize/1024);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lg.Info("errore salvataggio: {0}", exc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
-51
@@ -1,51 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ETS_WS {
|
||||
|
||||
|
||||
public partial class test {
|
||||
|
||||
/// <summary>
|
||||
/// form1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// ScriptManager1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.ScriptManager ScriptManager1;
|
||||
|
||||
/// <summary>
|
||||
/// imgCarica control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Image imgCarica;
|
||||
|
||||
/// <summary>
|
||||
/// AjaxFileUpload1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.AjaxFileUpload AjaxFileUpload1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user