C
C#5mo ago
Salight

Why is this exception occuring what am i have to do ?

No description
6 Replies
i like chatgpt
i like chatgpt5mo ago
$code
MODiX
MODiX5mo ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat For longer snippets, use: https://paste.mod.gg/
phaseshift
phaseshift5mo ago
(people like code, not screenshots). I'm not a front end guy so not sure what's up.
Salight
Salight5mo ago
//index.cshtml
@page
@model MeetingInfo

@{

ViewBag.Title = "Toplantı Başvuru ";
Layout = "_layout2";
}

<h1 class="h4">@ViewBag.Selamlama</h1>
<p>Toplantı Katılım Durumunuzu bildiriniz
</p>
<div class="card my-2">
<ul class="list-group list-group-flush">
<li class="list-group-item">@Model.Location </li>
<li class="list-group-item">@Model.Date.ToString("dd/MM/yyyy HH:mm:ss") </li>
<li class="list-group-item">@Model.NumberOfPeople </li>
</ul>
</div>
<a class="btn btn-sm btn-outline-primary" asp-controller="Meeting" asp-action="Apply">Başvuru yap</a>

//index.cshtml
@page
@model MeetingInfo

@{

ViewBag.Title = "Toplantı Başvuru ";
Layout = "_layout2";
}

<h1 class="h4">@ViewBag.Selamlama</h1>
<p>Toplantı Katılım Durumunuzu bildiriniz
</p>
<div class="card my-2">
<ul class="list-group list-group-flush">
<li class="list-group-item">@Model.Location </li>
<li class="list-group-item">@Model.Date.ToString("dd/MM/yyyy HH:mm:ss") </li>
<li class="list-group-item">@Model.NumberOfPeople </li>
</ul>
</div>
<a class="btn btn-sm btn-outline-primary" asp-controller="Meeting" asp-action="Apply">Başvuru yap</a>

Ahsan_Naqvi
Ahsan_Naqvi5mo ago
It seems the Modal is null
Salight
Salight5mo ago
//HomeController

using MeetingApp.Models;
using Microsoft.AspNetCore.Mvc;

namespace MeetingApp.Controllers
{
public class HomeController:Controller
{
//localhost/home
public IActionResult Index()
{
int saat = DateTime.Now.Hour;
ViewBag.Selamlama = saat > 12 ? "İyi günler" : "Günaydın";
//ViewData["Selamlama"] = saat > 12 ? "İyi günler" : "Günaydın";

var meetingInfo=new MeetingInfo()
{
Id = 1,
Location="İstanbul,Abc kongre Merkezi",
Date=new DateTime(2024,01,20,20,0,0),
NumberOfPeople=100
};
var info = new MeetingInfo();
info.Id = 2;
info.Location = "Wow";
info.Date = new DateTime(2024,01,20,20,0,0);
info.NumberOfPeople = 100;
return View(info);

}
}
}
//HomeController

using MeetingApp.Models;
using Microsoft.AspNetCore.Mvc;

namespace MeetingApp.Controllers
{
public class HomeController:Controller
{
//localhost/home
public IActionResult Index()
{
int saat = DateTime.Now.Hour;
ViewBag.Selamlama = saat > 12 ? "İyi günler" : "Günaydın";
//ViewData["Selamlama"] = saat > 12 ? "İyi günler" : "Günaydın";

var meetingInfo=new MeetingInfo()
{
Id = 1,
Location="İstanbul,Abc kongre Merkezi",
Date=new DateTime(2024,01,20,20,0,0),
NumberOfPeople=100
};
var info = new MeetingInfo();
info.Id = 2;
info.Location = "Wow";
info.Date = new DateTime(2024,01,20,20,0,0);
info.NumberOfPeople = 100;
return View(info);

}
}
}
//model

namespace MeetingApp.Models
{
public class MeetingInfo
{
public int Id { get; set; }
public string? Location { get; set; }
public DateTime Date { get; set; }
public int NumberOfPeople { get; set; }
}
}
//model

namespace MeetingApp.Models
{
public class MeetingInfo
{
public int Id { get; set; }
public string? Location { get; set; }
public DateTime Date { get; set; }
public int NumberOfPeople { get; set; }
}
}
in here i am assigning the model variables how is null then doesn't that counts backend
Want results from more Discord servers?
Add your server
More Posts
✅ Reflection independent from .Net version and bitness?I'm working on a tool (https://github.com/tolik518/JackTheEnumRipper) that dumps all the *enums* froAuthentication error responsesWhat's the best way for ASP.NET Core Web Api to send authentication error responses to a frontend, s✅ Entityframework for framework 4.8 instead of .net / coreHello, I'm trying to use EF with framework 4.8. There is a version 6.4.4. When using this, I cant fAutoMapper: Ignoring Nested Property in Mapping Configuration Results in Null ValueI'm encountering an issue with AutoMapper where I'm trying to ignore a nested property during mappinAny Methods to Obtain POSIX Thread Handle for System.Threading.Thread in LinuxSo I am trying to find a way to obtain the pthread (POSIX thread) handles for my threads. I found a trying to deploy my app with docker with my problemsSo i have my container running, and when I go to localhost:8080 where the docker is running, it take.NET tool/library for communication/network loggingHye guys, I was asked to do some "research" to find some fancy/cool way to logging communication betstruggling with objects and methods```cs class Circle { float radius; int id; int nextID; static void initCircle() .runsettings Coverage Pattern Not WorkingHello can someone please help me fix my runsettings to only collect from the "Controllers" folder: `✅ How can I convert/flatten an 8-Digit Hex color (Alpha) to a 6-Digit Hex color (Assuming white BG)Does anyone here know how to convert an 8-Digit HEX color code to a 6-Digit HEX color code (Assuming