|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
ASP.NET Data Binding
Bismillah Hirrahma Nirraheem 0
Hello Sir... Im experiencing some problems in binding Records from a Column of a db to a Drop Down Menu in ASP.NET. Im Using VB.NET... I've written the source code thats as follow: objAdapter.Fill(objDataSet, "Catagories") ddmCatagory.DataSource = objDataSet.Tables("Cat").DefaultView ddmCatagory.DataBind() 'ddmCatagory is Drop Down Menu ID As the result of this binding code "System.Data.DataRowView" is Binded with DDM... I've also tried DefaultView.ToString but it also doesnt work... _____________ Thanks... Nauman Ahmed |
|
#2
|
|||
|
|||
|
You need to set the DataMember property.
objAdapter.Fill(objDataSet, "Catagories") ddmCatagory.DataSource = objDataSet.Tables("Cat").DefaultView ddmCatagory.DataMember="some column name" ddmCatagory.DataBind() 'ddmCatagory is Drop Down Menu ID |
|
#3
|
|||
|
|||
|
Bismillah Hirrahma Nirraheem 0
Hello Jcrouch... Thanks a lot for your reply . But I think that ddmCatagory.DataValueField = "Article_Title" would work better instead of ddmCatagory.DataMember. Anyway... you provide me the guideline.... thanks a lot... ____________ Regards... Nauman Ahmed |
|
#4
|
|||
|
|||
|
Sorry I got it wrong.
Glad to hear I helped anyway. I was working from memory and rushing off to lunch when I blasted off that message. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > ASP.NET Data Binding |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|