MyControl.GetType().FullName =
"System.Web.UI.WebControls.DropDownList"
MyDDL = MyControl
DBInsert.CommandText = "Insert Into SurveyResponses " +
"(SurveyQuestionID, SurveyResponse) " +
"values (" +
Mid(MyDDL.ID, 2) + ", " +
"'" +
Replace(MyDDL.SelectedItem.Text, "'", "''") +
"')"
"System.Web.UI.WebControls.DropDownList"
MyDDL = MyControl
DBInsert.CommandText = "Insert Into SurveyResponses " +
"(SurveyQuestionID, SurveyResponse) " +
"values (" +
Mid(MyDDL.ID, 2) + ", " +
"'" +
Replace(MyDDL.SelectedItem.Text, "'", "''") +
"')"
''中的第一个'就是一个转义符