ve-87.tmp

来自「its a website on property dealing made i」· TMP 代码 · 共 72 行

TMP
72
字号
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class adsearch : System.Web.UI.Page
{
    static string locality;
    static string price;
    static string area;
    static string facing;
    static string bedroom;
    static string floorno;
    static string tab;
    protected void Page_Load(object sender, EventArgs e)
    {
        locality = Session["p"];
        price = Session["pr"];
        area = Session["ar"];
        facing = Session["fa"];
        bedroom = Session["bd"];
        floorno = Session["fl"];
        tab = Session["ap"];


        if (tab == "Residential Land")
        {
            SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=epropertydb;Integrated Security=True");
            con.Open();
            SqlDataAdapter da = new SqlDataAdapter("Select facing,shortdescription,annualdues,electricalsupply,railwaydistance,schooldistance,busstopdistance,hospitaldistance from (residentialland join propertyforsalerent ON residentialland.propertyid=propertyforsalerent.propertyid) where(locality='" + locality + "' AND pricerent='" + price + "' AND area='" + area + "' AND facing='" + facing + "' )", con);
            DataSet ds = new DataSet();
            da.Fill(ds);
            con.Close();
            GridView2.DataSource = ds;
            GridView2.DataBind();
        }

    }

      /*  SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=epropertydb;Integrated Security=True");
        con.Open();
        SqlDataAdapter da = new SqlDataAdapter("Select propertyid from  ", con);
        DataSet ds = new DataSet();
        da.Fill(ds);
        con.Close();
        GridView1.DataSource = ds;
        GridView1.DataBind();
   */     
    protected void GridView2_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void GridView3_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void TextBox1_TextChanged(object sender, EventArgs e)
    {

    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?