خرید بک لینک

Vote count: 0

i try to get calendar ID in LINQ .. So i try this query query

T1 ts = new T1();
        var list1 = ts.table2.ToList();
        var list1 = ts.table2.ToList();
        var dq = (from reg_data in list1
                  join re in ts.table1 on reg_Data.RID equals re.RID
                  where reg_data.RID == Convert.ToInt32(regiondrop.SelectedValue)
                   || (re.startdate == fromdate.Value && re.enddate == todate.Value)
                  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();

but there is error in from_date and to_date

The name 'todate' does not exist in the current context

The name 'fromdate' does not exist in the current context

html

<input type="text" ID="fromdate" /> 
<input type="text" ID="todate" />

so how i get this fromdate and todate in query

any solution please?

asked 46 secs ago

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 1 تير 1395 ساعت: 13:42

صفحه بندی