IamMax420
IamMax420
CC#
Created by IamMax420 on 6/26/2024 in #help
Log in system error
Ummmmmmm idk what you're talking about
13 replies
CC#
Created by IamMax420 on 6/26/2024 in #help
Log in system error
also what docs do you mean?
13 replies
CC#
Created by IamMax420 on 6/26/2024 in #help
Log in system error
I mean it basically says that something went wrong trying to register
13 replies
CC#
Created by IamMax420 on 6/26/2024 in #help
Log in system error
so it's basically !result.Succeeded
13 replies
CC#
Created by IamMax420 on 6/26/2024 in #help
Log in system error
more specifically, when I hit the "submit" button, console prints out "error", which is what I did here if (result.Succeeded) { await _signInManager.SignInAsync(user, isPersistent: false); return RedirectToPage("/Index"); } else { Console.WriteLine("Error"); }
13 replies
CC#
Created by IamMax420 on 6/26/2024 in #help
Log in system error
when the user enters their data into the registration form, it's not being sent to the database
13 replies
CC#
Created by IamMax420 on 6/26/2024 in #help
Log in system error
am I missing something?
13 replies
CC#
Created by IamMax420 on 6/6/2024 in #help
object ref not set blah blah blah
nvm forgot to add the [BindProperty] attribute 💀
3 replies
CC#
Created by IamMax420 on 6/6/2024 in #help
object ref not set blah blah blah
here's the cshtml file btw @page @model AplikacjaWeb.Pages.Logowanie.LogowanieModel @{ } <h1 class="Logowanie">Logowanie</h1> <div class="container border" style="padding:20px;"> <form method="post" style="margin-left:400px;"> <div class="text-danger" asp-validation-summary="ModelOnly"></div> <div class="form-group row div1"> <div class="col-3 column1"> <label asp-for="Input1.Username">Username:</label> </div> <div class="col-2"> <input type="text" asp-for="Input1.Username" class="form-control" style="margin-left:-110px; margin-top:-10px; width:250px;" /> </div> <span class="text-danger" asp-validation-for="Input1.Username"></span> @*ten span sprawia że gdy user nie wprowadzi danych do pola to zostanie wyswietlona wiadomosc z atrybutu required*@ </div> <div class="form-group row div2"> <div class="col-3 column2"> <label asp-for="Input1.Password">Password:</label> </div> <div class="col-2"> <input type="password" asp-for="Input1.Password" class="form-control" style="margin-left:-110px; margin-top:-10px; width:250px;" /> </div> <span class="text-danger" asp-validation-for="Input1.Password"></span> </div> <div> <button type="submit" class="przycisk1">Zaloguj</button> </div> </form> </div>
3 replies
CC#
Created by IamMax420 on 5/22/2024 in #help
I'm getting an error "object reference not set to an instance of an object"
thanks though @ZZZZZZZZZZZZZZZZZZZZZZZZZ
13 replies
CC#
Created by IamMax420 on 5/22/2024 in #help
I'm getting an error "object reference not set to an instance of an object"
crazy how sometimes such small oversights can cost you 30 mins or even an hour of trying to figure out what is going on lol
13 replies
CC#
Created by IamMax420 on 5/22/2024 in #help
I'm getting an error "object reference not set to an instance of an object"
but after doing return View(products); and return View(product) respectively, it seems to be working now
13 replies
CC#
Created by IamMax420 on 5/22/2024 in #help
I'm getting an error "object reference not set to an instance of an object"
these two: [HttpGet] [HttpGet] public IActionResult List1() { var products = _warehouseService.GetAllProdukts(); return View(); } [HttpGet] public IActionResult Details(int id) { var product = _warehouseService.Get(id); return View(); }
13 replies
CC#
Created by IamMax420 on 5/22/2024 in #help
I'm getting an error "object reference not set to an instance of an object"
here's the code: using Microsoft.AspNetCore.Mvc; using WebApp.Models; using WebApp.Services.Interfaces; namespace WebApp.Controllers { public class WarehouseController : Controller { private readonly IWarehouseService _warehouseService; public WarehouseController(IWarehouseService warehouseService) { _warehouseService = warehouseService; } public IActionResult Index() { return View(); } [HttpGet] public IActionResult Add() { return View(); } [HttpPost] public IActionResult Add(Produkt body) { if(!ModelState.IsValid) { return View(body); } //logika do zapisu produktu var id = _warehouseService.Save(body); ViewData["ProductId"] = id; TempData["ProductId"] = id; return RedirectToAction("List1"); } [HttpGet] public IActionResult List1() { var products = _warehouseService.GetAllProdukts(); return View(); } [HttpGet] public IActionResult Details(int id) { var product = _warehouseService.Get(id); return View(); } [HttpDelete] public IActionResult Delete(int id) { _warehouseService.Delete(id); return RedirectToAction("List1"); } } }
13 replies
CC#
Created by IamMax420 on 5/22/2024 in #help
I'm getting an error "object reference not set to an instance of an object"
You mean the controller name? it's WarehouseController
13 replies
CC#
Created by IamMax420 on 5/8/2024 in #help
what does assembly mean c#-wise ?
get it now, thank you
7 replies
CC#
Created by IamMax420 on 5/8/2024 in #help
what does assembly mean c#-wise ?
is this the same thing as translation unit in cpp?
7 replies
CC#
Created by IamMax420 on 5/7/2024 in #help
✅ why is the random number not being printed to the console?
thanks for help, have a good day
58 replies
CC#
Created by IamMax420 on 5/7/2024 in #help
✅ why is the random number not being printed to the console?
are you always so condesceding towards beginners?
58 replies
CC#
Created by IamMax420 on 5/7/2024 in #help
✅ why is the random number not being printed to the console?
No description
58 replies