2
Answers

convert from sting to date

elsabbah ahmed

elsabbah ahmed

12y
1.4k
1
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)