Link to home
Start Free TrialLog in
Avatar of ITsolutionWizard
ITsolutionWizardFlag for United States of America

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
ASKER CERTIFIED SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ITsolutionWizard

ASKER

I already saw it but i just need some sample to learn how it works.
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
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
it is not web form. I usually use service reference and then bind the asp.net controller.
and you can get the .Net Library using nuget manager...
User generated image
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

public void MakeCall_GetAllMakes()
        {
            SetHttpResponse(listOfMakes);
            var makeList = _api.Call<MakeList>("/api/vehicle/v2/makes?state=new").Result;
        }

Open in new window


then use makeList wherever you need...
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...

var makeList = _api.Call<MakeList>("/api/vehicle/v2/makes?state=new").Result;
carmakelist.DataSource= makeList;
carmakelist.DataBind();

Open in new window