-
Notifications
You must be signed in to change notification settings - Fork 1
/
RentContact.aspx.cs
34 lines (33 loc) · 1.04 KB
/
RentContact.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
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Bokado_In
{
public partial class RentContact : System.Web.UI.Page
{
Connection con = new Connection();
SqlCommand com = new SqlCommand();
SqlDataReader rd;
protected void Page_Load(object sender, EventArgs e)
{
if (Session["UserInfo"] == null)
{
Response.Redirect("Login.aspx");
}
string id = Session["contact"].ToString();
con.getConnection();
com = new SqlCommand("select * from Rent where rid = '" + id + "'", con.getConnection());
rd = com.ExecuteReader();
while (rd.Read())
{
Label1.Text = rd["Oname"].ToString();
Label2.Text = rd["Ophone"].ToString();
Label3.Text = rd["Oemail"].ToString();
}
}
}
}