I
IGotNothin
Seems like this should be simple, but I'm new to vb.net. I've created
a array of strings. I want to bind them to a dropdown list. I was
able to do this with a one dimensional array with no problem, but with
a separate column for text and value, I can't find how to tell it which
columns to use. Code:
Dim months(,) As String = {{"00", "Select One"}, {"01", "January"},
{"02", "February"}, {"03", "March"}}
expmonth.DataSource = months
expmonth.DataTextField = ??
expmonth.DataValueField = ??
expmonth.DataBind()
So basically I just want to know what to put where the question marks
are. Seems like it should be obvious, but so far everything I've tried
hasn't worked. Could be I'm not creating the array to begin with, but
don't know.
Thanks in advance for any help.
a array of strings. I want to bind them to a dropdown list. I was
able to do this with a one dimensional array with no problem, but with
a separate column for text and value, I can't find how to tell it which
columns to use. Code:
Dim months(,) As String = {{"00", "Select One"}, {"01", "January"},
{"02", "February"}, {"03", "March"}}
expmonth.DataSource = months
expmonth.DataTextField = ??
expmonth.DataValueField = ??
expmonth.DataBind()
So basically I just want to know what to put where the question marks
are. Seems like it should be obvious, but so far everything I've tried
hasn't worked. Could be I'm not creating the array to begin with, but
don't know.
Thanks in advance for any help.