C
C#11mo ago
Lucas

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
No description
No description
No description
40 Replies
Lucas
LucasOP11mo ago
Any help will be greatly appreciated.
Buddy
Buddy11mo ago
$screenshot
MODiX
MODiX11mo ago
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.
Jimmacle
Jimmacle11mo ago
what's this for? this looks like pretty outdated code
leowest
leowest11mo ago
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.
Lucas
LucasOP11mo ago
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.
Angius
Angius11mo ago
Oof, my sincerest condolences for them
Jimmacle
Jimmacle11mo ago
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
Angius
Angius11mo ago
Probably some legacy project started in 1999
Lucas
LucasOP11mo ago
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.
Jimmacle
Jimmacle11mo ago
i wish schools would update their courses to not use ancient tech
Lucas
LucasOP11mo ago
I agree, the school system is outdated.
Angius
Angius11mo ago
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 much
Lucas
LucasOP11mo ago
Just 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
Angius
Angius11mo ago
If I were teaching outdated technologies, I'd at least teach them following the spec, like using proper naming But sure
Lucas
LucasOP11mo ago
I know it’s not secure, it’s open to injection, but it’s just for them to grasp the idea.
Angius
Angius11mo ago
And can you not use technology newer than the last two decades to demonstrate the idea?
Lucas
LucasOP11mo ago
What do you mean by that? The computer orrr the actual software?
Angius
Angius11mo ago
No description
Angius
Angius11mo ago
I mean this It got EOL'd in 2010
Lucas
LucasOP11mo ago
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.
Angius
Angius11mo ago
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
Lucas
LucasOP11mo ago
If you were me, what would you do that includes Ajax?
Angius
Angius11mo ago
AJAX, as in sending data between a backend API and whatever client, right?
Lucas
LucasOP11mo ago
Yes.
Angius
Angius11mo ago
Or specifically the jQuery $.ajax method?
Lucas
LucasOP11mo ago
Sending data between a backend
leowest
leowest11mo ago
welcome to cave teachers in university it is what it is my condolences that u have to write code with such an ancient framework
Angius
Angius11mo ago
ASP.NET Core 8 Minimal API project for the backend Whatever for the frontend, could even be a .NET 8 console app
Lucas
LucasOP11mo ago
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?
Angius
Angius11mo ago
Sure
leowest
leowest11mo ago
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
Angius
Angius11mo ago
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 works
Jimmacle
Jimmacle11mo ago
is it just me or is that missing code the minimal api looks empty and so do the types in the shared project 👀
Angius
Angius11mo ago
Oh? Ah, it was Rider being a dingus All should be there now
Jimmacle
Jimmacle11mo ago
ye
Angius
Angius11mo ago
Feel free to do a code review lol PRs welcome, as they say :KEKW:
kurumi
kurumi11mo ago
No description
kurumi
kurumi11mo ago
$screenshot
MODiX
MODiX11mo ago
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.

Did you find this page helpful?