I am done with this
i select data from table1 and fill in drop-down
data is
RID Rname startdate enddate
1 Kh 2014-02-1 2014-02-28
2 Il 2014-04-02 2014-04-07
3 UH 2015-01-04 2015-04-20
AND so on
i concatenate query and fill drop-down so data in drop-down is like this
Kh 2014-02-1 2014-02-28
Il 2014-04-02 2014-04-07
UH 2015-01-04 2015-04-20
and then when i select data from drop-down then against this another data from another table (e.g. table2 ) is display in grid-view i.e.
i select KH so Kh RID is 1
so in according RID data is.. i display that data in grid-view and i am done with this
ID OName RegNo RID
1 han 29 1
2 Sah 91 1
3 Max 995 1
4 Rbal 97 1
but now the process is changes
i fill dropdown only with Rname and i place two calendars
e,g.
<input type="date" ID="from_date"/>
<input type="date" ID="to_date"/>
now i want when i select value from dropdown and select date from calendar then i want to display data on behalf of this
query which i try
T1 ts = new T1();
var list1 = ts.table2.ToList();
var dq = (from reg_data in list1
where reg_data.RID == Convert.ToInt32(regiondrop.SelectedValue)
orderby reg_data.OName
select new
{
ID = reg_data.ID,
OName = reg_data.OName,
RegNo = reg_data.RegNo,
RID = reg_data.RID,
}).ToList();
GridView1.DataSource = dq;
GridView1.DataBind();
any solution?