C
C#3mo 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
Lucas3mo ago
Any help will be greatly appreciated.
Buddy
Buddy3mo ago
$screenshot
MODiX
MODiX3mo 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
Jimmacle3mo ago
what's this for? this looks like pretty outdated code
leowest
leowest3mo 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
Lucas3mo 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
Angius3mo ago
Oof, my sincerest condolences for them
Jimmacle
Jimmacle3mo 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
Angius3mo ago
Probably some legacy project started in 1999
Lucas
Lucas3mo 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
Jimmacle3mo ago
i wish schools would update their courses to not use ancient tech
Lucas
Lucas3mo ago
I agree, the school system is outdated.
Angius
Angius3mo 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
Lucas3mo 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
Angius3mo ago
If I were teaching outdated technologies, I'd at least teach them following the spec, like using proper naming But sure
Lucas
Lucas3mo ago
I know it’s not secure, it’s open to injection, but it’s just for them to grasp the idea.
Angius
Angius3mo ago
And can you not use technology newer than the last two decades to demonstrate the idea?
Lucas
Lucas3mo ago
What do you mean by that? The computer orrr the actual software?
Angius
Angius3mo ago
No description
Angius
Angius3mo ago
I mean this It got EOL'd in 2010
Lucas
Lucas3mo 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
Angius3mo 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
Lucas3mo ago
If you were me, what would you do that includes Ajax?
Angius
Angius3mo ago
AJAX, as in sending data between a backend API and whatever client, right?
Lucas
Lucas3mo ago
Yes.
Angius
Angius3mo ago
Or specifically the jQuery $.ajax method?
Lucas
Lucas3mo ago
Sending data between a backend
leowest
leowest3mo 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
Angius3mo ago
ASP.NET Core 8 Minimal API project for the backend Whatever for the frontend, could even be a .NET 8 console app
Lucas
Lucas3mo 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
Angius3mo ago
Sure
leowest
leowest3mo 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
Angius3mo 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
Jimmacle3mo 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
Angius3mo ago
Oh? Ah, it was Rider being a dingus All should be there now
Jimmacle
Jimmacle3mo ago
ye
Angius
Angius3mo ago
Feel free to do a code review lol PRs welcome, as they say :KEKW:
kurumi
kurumi3mo ago
No description
kurumi
kurumi3mo ago
$screenshot
MODiX
MODiX3mo 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.
Want results from more Discord servers?
Add your server
More Posts
What is the most modern source for CLR internalsThis article from 2005 is cited a lot when discussing .NET CLR internals. Is there a similar point oProblem with Visual Studio not connecting to Google CloudI am trying to connect visual studio and google cloud account to use the API, but when I try to log ✅ Progressbar progression over taskbar icon without nugetI'm trying to find a way to do this with Windows API or something else. I don't want to use nuget pa✅ Writing a source generator for this use caseI have some JSON data I want to load at startup, but image size has become a concern since in the puhow to load the dll for System.Management.Automation on runtime ?```cs using System; using System.Management.Automation; class PowerShhel { public static void Mhow to move json datas to mysqlI have few datas which stored in user_activity.json I need to move them to the mysql and I need to u✅ Is it possible to explicitly state that a method wont modify a mutable class?Assume the following class: ```csharp public sealed class MyTest { public string SomeString { get;Unable to publish WinUI due duplicated WebView2 package from MSIX tooling and nuget packageHello, I am unable to publish my current software due duplicated packages. I do used a workaround in(Maui) Native swipe back on iOShey, i want to implement the native swipe back into my .Net Maui App for iOS. But the only thing i What does happen with nullable` public static void Write(this IYamlStream stream, string Key, ref string? value, ScalarStyle style