Click here to Skip to main content
15,898,749 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ObjectResult<membershipfeature_select_result> LIST = obj.Select_Membership(Convert.ToInt32(ViewState["ID"]));
C#
txtile.Text=LIST.Single().Title ;
            txtdesc.Text = LIST.Single().Description;
            chk.Checked=Convert.ToBoolean(LIST.Single().IsActive);
        }




Getting an error during..in edited item filling..it fills anyone in 3 fields(txtilt.Text,txtdesc.Text,chk.Checked)..and i want to fill all of them from this list..
Posted
Comments
BELGIUMsky 6-May-14 10:55am    
maybe you could use code like this to make it easier to read

var item = LIST.Single();

txtile.Text = item.Title;
txtdesc.Text = item.Description;
...

Now i don't understand that you get a list if you ask for 1 item
Are you sure you get a list from that procedure?
ZurdoDev 6-May-14 11:23am    
User did not respond to your comment but it looks like something you said got it working. I suggest posting as solution.
itsathere 6-May-14 10:58am    
thanks..it's working..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900