Skip to main content

All Questions

-1 votes
1 answer
40 views

In .net core I want to get API through the two tables

In .Net core I have two tables with Buyer, and the relation table as RicePrice: public class Buyer { [Key] public int Id { get; set; } public int Quantity { get; set; ...
Karthick1211's user avatar
0 votes
1 answer
37 views

How to pass IHttpContextAccessor as parameter to ValidationClass' Method

I have a class for Validation which is: public class PageValidation:ValidationAttribute { private readonly string UserKey; private readonly HttpContext _context; public PageValidation(...
Yunus Mert Çakar's user avatar
0 votes
1 answer
285 views

How do I clear cookies with different domains?

I am developing a .net core mvc web application with the same site cookies. And I would like to clear all cookies after the user logged out. Please refer to the image: I have tried like this: foreach ...
Trax's user avatar
  • 361
0 votes
3 answers
86 views

RedirectToAction not doing anything

I have this method which should redirect to the Index method of the same controller. This method is called using ajax. public IActionResult ActualizarJornada(string data) { ...
R Marco's user avatar
0 votes
1 answer
631 views

Unicode character (\u0022) is showing backslash with double prime

Trying to handle this string 8202D-Ti-36" (This is &quote; HTML entity for inch/double quote) to #8202D-Ti-36" using replace function in C# Replace(""", "\...
Kaif Hasan's user avatar
1 vote
2 answers
53 views

i am no able to perform add-migration in

using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using _Istudnet.Helper; namespace _Istudnet.Models { public class Student { [Key] ...
Himanshu Sharma's user avatar
0 votes
0 answers
69 views

ASP.NET Core 6 MVC - Model doesn't binds

Making a few test with Core 6 - MVC. Can't figure out why while this works: [HttpPost] public IActionResult Create(IFormCollection collection) but when i used the view model, for some reason, ...
dr.Xis's user avatar
  • 127
0 votes
1 answer
567 views

How to Select Date Time with Month and Year Only .Net

I want to make user select date time month and year only. Even though i added bootstrap's datepicker i couldnt success. Here is my java script code in another file. $(document).ready(function () { $(&...
omneer's user avatar
  • 93
0 votes
1 answer
157 views

get news list by category id .net core

We have 3 models Category, Post and PostCategory. I want get news list by category id using generic repositor pattern so how to implement it. public class Category { public int Id { get; ...
Santosh Vishwakarma's user avatar
1 vote
1 answer
346 views

How to Pass Jsonstringfy object with other parameters

I want pass more parameter with json stringify() but when passing other variable getting null value. please let me know right way of passing more variable . I have tried this data: {model:JSON....
Jaya acharya's user avatar
-1 votes
1 answer
71 views

How can i use different status page in MVC .net core

My system has a website, a dashboard with an one admin.Users are redirected to statuspage during the visit in the same way as the admin, but I want the admin and users to see different pages I am ...
Ekrem Güneş's user avatar
1 vote
2 answers
92 views

I am unable to get the values from a form from cshtml page to my controller

I am getting null values in my controller after the form is submitted to the code <form action="Home/Book" method="Post"> <input type="text" id="Name&...
Code Noob's user avatar
0 votes
1 answer
4k views

Unable to add .NET project reference in VS 2019 or 2022

I'm trying to add a project ref to my main solution but unable to do so. I tried: Manually adding it from references option but the dll was not found. Changed the target version as well but no effect. ...
Coding_ninja's user avatar
3 votes
1 answer
738 views

In ASP.net core, How to Reload the _layout page when retun view()

I want to refresh the _layout page for updating data in the layout section, when a action method returns a view(). Currently when I am returning the View(), layout page data are not updating.
Nikhil_TP's user avatar
1 vote
1 answer
646 views

Is there an attribute I can use in net core 6 to restrict my controller to only allow calls which come from a certain paths?

For example I have a class: public class AccountsController : Controller { [HttpPost, Route("LogIn")] public LogIn([FromBody] request) { //log in } [HttpPost, Route("LogOut")] ...
mrhmanners's user avatar

15 30 50 per page
1
2 3 4 5