-
Notifications
You must be signed in to change notification settings - Fork 1
/
rentDetail.aspx.cs
42 lines (40 loc) · 1.41 KB
/
rentDetail.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
37
38
39
40
41
42
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 rentDetail : System.Web.UI.Page
{
Connection con = new Connection();
SqlCommand com = new SqlCommand();
SqlDataReader rd;
int id;
protected void Page_Load(object sender, EventArgs e)
{
id = Convert.ToInt16(Request.QueryString["id"].ToString());
con.getConnection();
com = new SqlCommand("select * from Rent where rid ='" + id + "'", con.getConnection());
rd = com.ExecuteReader();
while (rd.Read())
{
Image1.ImageUrl = rd["pic"].ToString();
Label1.Text = rd["city"].ToString();
Label2.Text = rd["proptype"].ToString();
Label3.Text = rd["price"].ToString();
Label5.Text = rd["descrip"].ToString();
Label6.Text = rd["address"].ToString();
Label7.Text = rd["Oname"].ToString();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
id = Convert.ToInt16(Request.QueryString["id"].ToString());
Session["contact"] = id;
Response.Redirect("RentContact.aspx");
}
}
}