I am using the following code to bind an xml file to a dropdown:
ds.ReadXml(MapPath("collations.xml"))
ddlCollation.Visible = True
ddlCollation.DataSource = ds
ddlCollation.DataTextField = ds.Tables("Collations").Columns("ColDescription").ToString
ddlCollation.DataValueField = ds.Tables("Collations").Columns("Collation").ToString
ddlCollation.DataBind()
|
Fine and well, but how can I add the selected value, I have one specific that I want to be selected by default, I know I can just copy it to the top of the xml file but curious if there is a programatical way to do it.