ddlPositions.SelectedValue = dt.Rows[0]["PostHeld"].ToString();
ddlTypeOfCourt.SelectedValue= courtApplicationDatesDTO.CourtTypeId.ToString();
selectedvalue will work
selecteditem.value will not work on above
but when we set the value to object from drop down selecteditem.value will work as below
courtApplicationDatesDTO.CourtTypeId = Convert.ToInt32(ddlTypeOfCourt.SelectedItem.Value);
No comments:
Post a Comment