G
Guest
This is what should be an easy question, but I can't get it through my head.
Can someone help me undestand the following?
The way I see it, .DataSource is whatever you decide to refer back to thel
the Datalist in my case it is an array:
System.Collections.ArrayList al = new ArrayList();
DropDownLIst1.DataBind(); is the call that I have to bind my fields that is
an easy one, but for the life of me I DON'T GET:
DropDownList1.DataTextField="Name";
DropDownList1.DataValueField="ID";
It doesn't make sense to me what the difference is for DataTExtField and
DataValueField. It seems that it doesn't matter one way or another, can
someone help me understand?
Provided below are all of the items but my question only lies in the ones
marked Q:
DropDownList1.DataSource=al;
Question: DropDownList1.DataTextField="Name";
Question: DropDownList1.DataValueField="ID";
DropDownList1.DataBind();
Can someone help me undestand the following?
The way I see it, .DataSource is whatever you decide to refer back to thel
the Datalist in my case it is an array:
System.Collections.ArrayList al = new ArrayList();
DropDownLIst1.DataBind(); is the call that I have to bind my fields that is
an easy one, but for the life of me I DON'T GET:
DropDownList1.DataTextField="Name";
DropDownList1.DataValueField="ID";
It doesn't make sense to me what the difference is for DataTExtField and
DataValueField. It seems that it doesn't matter one way or another, can
someone help me understand?
Provided below are all of the items but my question only lies in the ones
marked Q:
DropDownList1.DataSource=al;
Question: DropDownList1.DataTextField="Name";
Question: DropDownList1.DataValueField="ID";
DropDownList1.DataBind();