-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEvent.aspx.cs
32 lines (27 loc) · 1.08 KB
/
Event.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
//Copyright (c) Nishit Tated. All Rights Reserved.
// project name: College Alumni System
//This project is licensed under the MIT license, see LICENSE
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
using System.Web.Security;
public partial class Event : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button2_Click(object sender, EventArgs e)
{
SqlConnection con2 = new SqlConnection(@"Data Source=(localDB)\v11.0; AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True");
con2.Open();
SqlCommand objc = new SqlCommand("INSERT INTO Event (Title,Description,Location, EventDate,Time) VALUES('" + TextBox1.Text + "','" + TextBox5.Text + "', '" + TextBox2.Text + "','" + TextBox3.Text + "' ,'" + TextBox4.Text + "')", con2);
objc.ExecuteNonQuery();
con2.Close();
}
}