<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <table border="1"> <tr> <td> <input type="file" name="name" value="" /> </td> <td> <input type="button" name="name" value="Upload" /> </td> </tr> </table> </form> </body> </html>
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.Services; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } [WebMethod] public static string Uploadfile() { //if(file uploaded successfully) return "File Uploaded"; //else return "error"; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)