This is my code I have face a Issue null value
public class NotificationMenuViewComponent : ViewComponent
{
public IViewComponentResult Invoke(NotificationMenuDataModel notificationMenuDataModel)
{
var vm = new Notification();--Here Null Value Render but i have set value in input box.
if (vm.Title != null)
{
try
{
vm.Title = notificationMenuDataModel.Title;
vm.Message = notificationMenuDataModel.Message;
}
catch (Exception ex)
{
}
}

Sachin SinghRank #66 · 26.2K reputationPosted May 26, 2021, 4:41 AM EDT
Salman BegRank #284 · 8.8K reputationPosted May 26, 2021, 1:00 AM EDT
Salman BegRank #284 · 8.8K reputationPosted May 26, 2021, 3:18 AM EDT