I have made webservice and also create object to create record in navision database but my table contain option datatype field?
how to insert the value form asp.net with c#.net using webservice. ](*,)
i want to fill gender field which is option datatype in navision table through the drop down list in asp.net with c#,net .
contact.Gender =ddl_gender.SelectedValue.ToString()
i got error
Cannot implicitly convert type 'string' to 'ContactCardservice.Gender'
Answers
You can look on this post as example
http://blogs.msdn.com/freddyk/archive/2 ... d-rtm.aspx
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
contact.Gender =ddl_gender.SelectedValue.ToString()
i got error
Cannot implicitly convert type 'string' to 'ContactCardservice.Gender'
help me ](*,)
Navision Technical Consultant
Since in your app the option are string, you need to compare string and then assign it.
if MyContact.Gender.Male.toString = ddl_gender.SelectedValue.ToString then
MyCont.Gender = MyContact.Gender.Male
else
MyCont.Gender = MyContact.Gender.Female
I don't have VS in front of me to confirm this.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n