convert from sting to date

May 26 2012 12:05 PM
I try to pass some variable from visual studio .net (C#) to database through storedprocedure ,
but i have problem with convert from string to date

can i find some help?

thank you all


protected void AddButton_Click(object sender, EventArgs e)
 {

      int rowsaffected = MainTable.InsertIntoMainTable(int.Parse(DistDropDownList.SelectedValue), myDate, int.Parse(DiseaseDropDownList.SelectedValue), int.Parse(CasesTextBox.Text), int.Parse(GovDropDownList.SelectedValue));
       
        if (rowsaffected > 0)
        {
            ResultLabel.Text = "New Row Added";

        }
        else
        {
            ResultLabel.Text = "No Rows Added";
        }
    }

Answers (2)