C
C#β€’12mo ago
Gab' πŸͺ

❔ Form in ASP.NET.MVC doesn't work

hi, guys! nice to meet y'all, I just got here! :) this may sound like a silly question, but I'm new to C# so I'm kinda lost rn πŸ’” so, i've being trying a create a form in ASP.NET.MVC, but, eveytime try to run my project, the form just doesn't show up, only text. can someone check if there's anything wrong with my coding? it's a simple code because I'm still learning about forms in MVC, so it's probably only a minor mistake i made or something like that. thank u! <3
8 Replies
Saber
Saberβ€’12mo ago
whats a imput
Gab' πŸͺ
Gab' πŸͺβ€’12mo ago
....... bruh. lol thank u, I'm not a native English speaker so those things happen sometimes
Saber
Saberβ€’12mo ago
Angius
Angiusβ€’12mo ago
Weird that it didn't show you a warning or something about a nonexistent tag I guess it's VSCode though, so
Denis
Denisβ€’12mo ago
Next time do $code
MODiX
MODiXβ€’12mo ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat If your code is too long, post it to: https://paste.mod.gg/
Denis
Denisβ€’12mo ago
And press the print screen button on your keyboard. Otherwise Win+Shift+S There a couple extra things I've noticed in the code you've shared. You never, ever write code and name things with special characters of your native language. In your case I saw UsΓ‘rio. In general, it is best practice to use English names. This helps you in the long run, because in places like this discord, people will have a better chance of understanding your code Next, things in C# have naming conventions - rules/guidelines. Property names are written in upper camel case:
public int UpperCamelCaseExample { get; set; }
public int UpperCamelCaseExample { get; set; }
To generally avoid errors like you've encountered and have an overall better development experience with C#, I advise you to use Visual Studio Community 2022 Vs code is fine, but still isn't quite sufficient for beginners
Accord
Accordβ€’12mo 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.