raj aryan

raj aryan

  • NA
  • 26
  • 25.6k

want to add calendar by following mentioned criteria

Sep 13 2012 7:17 AM
Hello EveryOne!

I am new this site. As i heard  lot about this site from my friends. And from now i will be an active member of this site rather than social community.

As i am a new comer for .NET. and i have so many questions in my mind, but rather than asking all that question i will ask that whenever any problem will arises in the programming.

Here is my 1st ques.

i have 3 dropdownlists, on the basis of selection of that and 1 date for which i used ajax calender control, the specific data from the dB will be retrieved. it happens so.

now i want to add one more functionality in that... if user want a data iin a specific time span(for this i used between query and gives 2 separate calendar control other than first). means if user checks a radiobtn the 2nd criteria of between date will be activated...By default single calendar will active....

Here is my code...the comment part gives null value..




string strCriteria = "";

            strCriteria = strCriteria + " WHERE Z='" + DropDownList1.SelectedItem.ToString() + "'";

 

            /* if (RadioButton1.Checked = true)

                strCriteria = strCriteria + " AND Date between '" + limdatebox1.Text + "' AND '" + limdatebox2.Text + "'";

            else*/

            strCriteria = strCriteria + " AND Date<='" + TextBox1.Text + "'";

 

            if (DropDownList3.SelectedItem.Text != " AllMe")

                strCriteria = strCriteria + " AND BN='" + DropDownList3.SelectedItem.ToString() + "'";

 

            if (DropDownList2.SelectedItem.Text != " AlBl")

                strCriteria = strCriteria + " AND Register='" + DropDownList2.SelectedItem.ToString() + "'";

 

            string qryChechData = "Select * From Database";

            qryChechData = qryChechData + " " + strCriteria;