ITsolutionWizard
asked on
edmunds api
we want to see anyone has been developing web form /c# with edmunds api. They do not have .net/c# sample.
Assume we have <asp:net dropdown> and I just need to bind their car maker, model, and year.
c#, asp.net
Assume we have <asp:net dropdown> and I just need to bind their car maker, model, and year.
c#, asp.net
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I already saw it but i just need some sample to learn how it works.
sample is in my post above...
here is test project in c# using the api
https://github.com/ghotiphud/EdmundsApi/tree/master/EdmundsApi.Test
ASKER
i have no idea.
i have no idea.
I dont get why you dont have any idea :)
here is a c# code that has everything...
https://github.com/ghotiphud/EdmundsApi/blob/master/EdmundsApi.Test/EdmundsTests.cs
ASKER
it is not web form. I usually use service reference and then bind the asp.net controller.
ASKER
how to bind it?
check the sample app which I gave the link
https://github.com/ghotiphud/EdmundsApi/blob/master/EdmundsApi.Test/EdmundsTests.cs
then call will be like
then use makeList wherever you need...
https://github.com/ghotiphud/EdmundsApi/blob/master/EdmundsApi.Test/EdmundsTests.cs
then call will be like
public void MakeCall_GetAllMakes()
{
SetHttpResponse(listOfMakes);
var makeList = _api.Call<MakeList>("/api/vehicle/v2/makes?state=new").Result;
}
then use makeList wherever you need...
ASKER
if i have <asp:dropdown runat=server id=carmakelist>, how can bind in code behind?
did you ever write any c# code?
if you have a .net control and a data source like list/array/resulset etc...
you just set datasource and bind it...
if you have a .net control and a data source like list/array/resulset etc...
you just set datasource and bind it...
var makeList = _api.Call<MakeList>("/api/vehicle/v2/makes?state=new").Result;
carmakelist.DataSource= makeList;
carmakelist.DataBind();
ASKER