class error
So I am trying to identify a class in my .asmx file that is from my .cs file and it keeps erroring, they are both in the root file, they both have the right spelling and the class is global, I don’t know why it is not picking it up
Sorry for the bad screenshots, work pc
40 Replies
Any help will be greatly appreciated.
$screenshot
If you want to share code, please copy and paste the code into a markdown code block in your discord post, or paste the code into https://paste.mod.gg/ and share a link to it in your discord post.
If want to share a screenshot, please do not take a photo of your computer screen with your phone or camera. Instead see https://www.take-a-screenshot.org/ for how to take a screen capture on your device. You may want to crop the image before pasting it into your discord message.
what's this for? this looks like pretty outdated code
do u not have discord on your pc? that is so hard to read
besides we cannot copy and paste image as code
so if we wanted to point something to u we would have to rewrite it.
Sorry, it’s my work pc, when I’m back tmz I will copy n send the code
Just a todo list, just sends information to a text file, trying to give an example of developing for this work experience pupil we have joining us soon.
Oof, my sincerest condolences for them
yeah rip
is there a reason you're training them on this specific technology?
i had to google what it is just to find out it's probably not a choice for new development
Probably some legacy project started in 1999
Ajax requests, it’s what we have been told as one of the topics from the school, we gave them that with also creating a website
Ajax isn’t really used that commonly today, but it is still useful for sending and receiving data from a server.
i wish schools would update their courses to not use ancient tech
I agree, the school system is outdated.
And to use proper naming, I just noticed the class is called lowercase
backend
lol
Ajax is marginally useful, sure.
Webforms, or whatever it is, not so muchJust for the pupil to grasp the idea that what he is doing at that time is backend development, creating an asmx file that sends and revives data from a txt file
If I were teaching outdated technologies, I'd at least teach them following the spec, like using proper naming
But sure
I know it’s not secure, it’s open to injection, but it’s just for them to grasp the idea.
And can you not use technology newer than the last two decades to demonstrate the idea?
What do you mean by that? The computer orrr the actual software?
I mean this
It got EOL'd in 2010
Understandable, i will be real with you, we don’t do web development in our team and we don’t use .net framework, it’s just what the school has given us to do, i didn’t even realise that it was outdated, thank you for letting me know.
If I wanted to just demonstrate some idea with a web app, be it API or anything else, I'd use the newest version of .NET (.NET 8 currently) and a modern web framework (ASP.NET Core 8 currently)
If you're dead-set on using Webforms, I won't be of much — if any — help here
I don't think anybody will be, tbh
If you were me, what would you do that includes Ajax?
AJAX, as in sending data between a backend API and whatever client, right?
Yes.
Or specifically the jQuery
$.ajax
method?Sending data between a backend
welcome to cave teachers in university it is what it is my condolences that u have to write code with such an ancient framework
ASP.NET Core 8 Minimal API project for the backend
Whatever for the frontend, could even be a .NET 8 console app
Hmm ok, so what task would you set them, at the moment we have just a todo list that saves data to a txt file, also has a delete function. do you think that is applicable?
Sure
well it depends if your teacher says it needs to be done in .net framework 4 then u would be limited to winform, wpf, console and webforms
I had a spare moment, so here, here's how I'd do it with modern technology: https://github.com/Atulin/AjaxText
It's quick and dirty, I would normally separate the handlers into their own files, used
Spectre.Console
for better output on the client, and so on
But it worksis it just me or is that missing code
the minimal api looks empty and so do the types in the shared project 👀
Oh?
Ah, it was Rider being a dingus
All should be there now
ye
Feel free to do a code review lol
PRs welcome, as they say :KEKW:
$screenshot
If you want to share code, please copy and paste the code into a markdown code block in your discord post, or paste the code into https://paste.mod.gg/ and share a link to it in your discord post.
If want to share a screenshot, please do not take a photo of your computer screen with your phone or camera. Instead see https://www.take-a-screenshot.org/ for how to take a screen capture on your device. You may want to crop the image before pasting it into your discord message.