Click here to Skip to main content
13,343,419 members (57,289 online)
Rate this:
Please Sign up or sign in to vote.
See more:

this is my ASPX page

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html>

<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
        <table border="1">
                    <input type="file" name="name" value="" />
                    <input type="button" name="name" value="Upload" />

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)

    public static string Uploadfile()
        //if(file uploaded successfully)
            return "File Uploaded";
            return "error";

i want to upload single file by jQuery, but can't do it.
plz help me!!!
Posted 30-Jan-13 23:53pm
Gittu Dash 31-Jan-13 5:02am
Where is the Upload Logic ?
Do you want to Upload Asynchronously ??
shajarian_lover 31-Jan-13 5:04am
i want to send the selected file to asp code behind, then save it by Uploadfile()
Gittu Dash 31-Jan-13 5:20am
Well then I'd Suggest you to use Ajax Async File Upload Control.
So if you don't have any problem use this.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You might find this[^] question provides a decent answer. The big question, though, is which browsers you need to support. If you have to support old browsers (i.e. IE7, etc), then you need to consider using IFrames to support this.
Ankur\m/ 31-Jan-13 5:04am
Nandakishorerao 31-Jan-13 5:22am
superb 5..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.180111.1 | Last Updated 31 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100