31 questions
60
votes
7
answers
41k
views
post and get with same method signature
In my controller I have two actions called "Friends". The one that executes depends on whether or not it's a "get" versus a "post".
So my code snippets look something like this:
// Get:
[AcceptVerbs(...
3
votes
4
answers
2k
views
Custom Sort in LINQ Query
I have a table valued function that I'm calling with a LINQ query.
As I now understand it (as referenced here), the sorting needs to be done outside of the table valued function. This means, I have ...
1
vote
1
answer
2k
views
Use .Net Standard library in .Net Framework 4.7 application
I have a set of class libraries which are developed using .Net Standard 2.0. One of these class libraries implements the IAuthorizationFilter interface which is resides in Microsoft.AspNetCore.Mvc....
1
vote
1
answer
61
views
HttpPost in MVC 1
I have to maintain a project that uses MVC 1. It seems like it doesn't know anything about [HttpPost], and the same action method is called for both get and post. What is the right way to distinguish ...
1
vote
2
answers
5k
views
Unable to implement authorization with asp.net core
I am using asp.net core 2.2. I created an empty web application using Visual Studio 2019. I added this code in Startup.cs, in the configure services method:
services.AddMvc(config =>
{
var ...
1
vote
0
answers
128
views
"source not available" but only under certain conditions
I have an strange error in one of the views I am trying to load.
In one of my views I have about 3600 lines of code on that view, as soon as I try to load that view it shows me an error:- source not ...
0
votes
2
answers
3k
views
How can I return multiple datasets from a Controller?
Returning a single DataTable from a Controller works fine for me:
public ActionResult Index()
{
DataTable dtable = new DataTable();
dtable = SQL.ExecuteSQLReturnDataTable(SQL.SelectUnitsQuery,...
0
votes
2
answers
468
views
ViewModel with three different tables, how to join the three tables by lambda into one result?
I have the following ViewModel:-
public class PostCommentReplyViewModel
{
public List<POST> PostViewModel { get; set; }
public List<COMMENT> CommentViewModel { get; set; }
...
0
votes
0
answers
28
views
Unable to use the Microsoft.Practices.EnterpriseLibrary.Validation
When I am trying to run the validate in the application which try to create the object using the below code I get the error message
public static void Validate<TEntity>(this IValidated entity)
{
...
0
votes
2
answers
2k
views
ASP.NET issues an expired authentication Cookie
I am facing a weird issue with FormsAuthentication's .ASPXAUTH cookie. I migrated a .NET 4.6.2 MVC5 project to .NET 4.8 which is making use of FormsAuthentication and everything seem to work as ...
0
votes
1
answer
712
views
How to pass params to Action Method from ASPX based view using window.location.href
I am trying to pass string param to Action Method using Window.location.href but its not getting passed. I am having aspx based view without codebehind. Action Method gets called but with no param ...
0
votes
1
answer
260
views
ASP.NET MVC 5 DACPAC Sql140DatabaseSchemaProvider is not valid
I get this error when I run dacpac from VS Community 2017 MVC 5 project.
"Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql140DatabaseSchemaProvider is not ...
0
votes
1
answer
79
views
Set a static string if field is not empty [ASPNET MVC]
I have this problem:
I have a result grid with a column named Note. I want to set a static string into the column cell (e.g: Nota) if note field is full (now in this field there is the note content) ...
0
votes
1
answer
488
views
Aspnet mvc multi-tenant multiple instance issue
My Asp.net MVC 5 web application on IIS server cannot load multiple instances for different customers based on URL application name parameter. In other words, we cannot login two applications at the ...
0
votes
1
answer
897
views
Umbraco Ajax load more
Please can anyone help me . I am trying to use Ajax for to load more calendar event thats coming from my umbraco backend . from this code below
my calendar
i don't know how to do this but i want to ...
-2
votes
2
answers
317
views
Compare two lists on razor and sort them by newest (both have created datetime)
I want to sort two models by Datetime, both of them going to one timeline so i need the newest from them to be on the start of the list timeline, I found solutions like Union models, but I want them ...