C
C#13mo ago
DragonTigress

❔ Help with connecting API to visual studio

I was following a video I saw on youtube but now I'm lost. I need to connect to an API and extract information based on what a user selects in my windows forms that I have created. I have done some C# before but feel this is out of my league and it's for a school project.
23 Replies
Buddy
Buddy13mo ago
1.) Don't follow youtube tutorials, or you'll be stuck in tutorial hell. 2.) Please post more information, such as the code
MODiX
MODiX13mo ago
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
DragonTigress
DragonTigressOP13mo ago
It has multiple classes in it since that's what I was following but not sure I need that many classes. I am using http client somewhere in my code but I am using an API key also and then got stuck in my loop of hell. Then found this discord hoping I could get some help
x0rld 👻 🎃
x0rld 👻 🎃13mo ago
show us your code and the error you have
DragonTigress
DragonTigressOP13mo ago
Is there a way to upload a file somewhere? I don't have an error yet since I'm stuck on the last part of sending the information to my other code, I think. It's been a long day.
x0rld 👻 🎃
x0rld 👻 🎃13mo ago
with this
DragonTigress
DragonTigressOP13mo ago
I was looking at that. I'm copying all my different classes into the code now.
x0rld 👻 🎃
x0rld 👻 🎃13mo ago
you can add multiple files there is tab above you can add
DragonTigress
DragonTigressOP13mo ago
omg. didn't see that. let me go move it around lol
DragonTigress
DragonTigressOP13mo ago
https://paste.mod.gg/ Does this show my code now?
BlazeBin
A tool for sharing your source code with the world!
x0rld 👻 🎃
x0rld 👻 🎃13mo ago
no did you hit save ?
DragonTigress
DragonTigressOP13mo ago
Yes I did hit save.
x0rld 👻 🎃
x0rld 👻 🎃13mo ago
the url should have changed to something like that https://paste.mod.gg/bulddfqaxfgs/0
BlazeBin - bulddfqaxfgs
A tool for sharing your source code with the world!
DragonTigress
DragonTigressOP13mo ago
https://paste.mod.gg/nprjygltfole/4 oops I think I copied the url before I hit save
BlazeBin - nprjygltfole
A tool for sharing your source code with the world!
DragonTigress
DragonTigressOP13mo ago
Sorry I'm still super new to programming.
x0rld 👻 🎃
x0rld 👻 🎃13mo ago
that should be fine what's the issue ?
DragonTigress
DragonTigressOP13mo ago
Under WorkoutPlan, I have the last part where I need to insert the datasource into my listbox on my form. lstBoxWorkoutList is the name of my list box and not sure how to grab the information that the video was talking about. The video was grabbing an image and I'm grabbing text. And I wasn't sure if my code would work
x0rld 👻 🎃
x0rld 👻 🎃13mo ago
what the type of lstBoxWorkoutList ?
DragonTigress
DragonTigressOP13mo ago
It's just a listbox that I placed on the form. I'm not sure what else I could use to display the data. I think I might have found the problem on why it doesn't show the datasource. In the WorkoutPlan for the async Task LoadWorkoutPlan, I need to get the muscle group that was selected in the SelectArea class. I don't think I set the variable right in SelectArea called MuscleSelection. I need that variable to be in the WorkoutPlan.
Accord
Accord13mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
DragonTigress
DragonTigressOP13mo ago
No i didn’t get my code to work.
Accord
Accord13mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server