-
Notifications
You must be signed in to change notification settings - Fork 0
/
index1.aspx.cs
36 lines (33 loc) · 964 Bytes
/
index1.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Windows.Forms;
namespace excel
{
public partial class index1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
p.Visible = false;
}
protected void Button1_Click(object sender, EventArgs e)
{
string path = Path.GetFileName(FileUpload12.FileName);
path = path.Replace(" ", "");
FileUpload12.SaveAs(Server.MapPath("~/ExcelFile/") + path);
String ExcelPath = Server.MapPath("~/ExcelFile/") + path;
p.Visible = true;
Session["path"] = path;
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("WebForm1.aspx");
}
}
}