ASP.Net MVC v1 is the original version of Microsofts MVC framework. It has subsequently been replaced by several newer version (v2, v3, v3.5, v4 & v5). Use this tag for questions regarding version 1 (ONLY) of the Microsoft MVC framework.
Questions tagged [asp-net-mvc-1]
31 questions
60
votes
7 answers
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(HttpVerbs.Get)]
public ActionResult Friends()
{
…

codette
- 12,343
- 9
- 37
- 38
24
votes
7 answers
Invoking particular action on dropdown list selection in MVC
I have a dropdown list in an MVC view. On selection change of dropdown list I want to call specific action method in the controller.
What I have done on view is this :
<%=Html.DropDownList("ddl", ViewData["AvailableList"] as SelectList,
new {…

Jaqen H'ghar
- 1,839
- 7
- 37
- 66
3
votes
4 answers
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 to do it in the LINQ query.
I need some assistance…

madvora
- 1,717
- 7
- 34
- 49
2
votes
1 answer
ServiceStack Authentication flow
I’m integrating ServiceStack authentication in my own web app. The flow that I’m trying to implementing is
Calling Authenticate method of my own AuthProvider
If the authentication against authRepository returning true, the user will be redirect to…

w4rcT
- 180
- 1
- 13
1
vote
1 answer
MVC 5 and External login (With Google account) on Google Cloud Platform return null
I'm running a website that works great on Google Cloud Platform but there is a issue that I'm unable to resolve at code level on my website and I think it is related to GCP.
On the website the users can connect quickly through a Google account, the…

דניאל
- 183
- 9
1
vote
0 answers
Cannot navigate to other pages on the website after AJAX calls on Google Chrome
I have a problem with my project that I have not found a solution for a long time.
One of the pages on the website has buttons that call for data from the server by AJAX calls, after I click on some of them I can not navigate to other pages on the…

דניאל
- 183
- 9
1
vote
0 answers
"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 available, and as soon as I reduce lines of code…

דניאל
- 183
- 9
1
vote
2 answers
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 policy = new…

B1B
- 193
- 5
- 16
1
vote
1 answer
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.Filters namespace.
public class AuthorizationFilter…

Vahid Farahmandian
- 6,081
- 7
- 42
- 62
1
vote
1 answer
Why is my webpage load time more than 10 secs even with 98% speed performance score?
Is there any way to identify why this website initial loading is very slow? I have checked in my each and every part of the HTML structure and code (Requests, Response).
It’s loading very fast after first time loading completes.
I have performed…

sridharnetha
- 2,104
- 8
- 35
- 69
1
vote
2 answers
Load list of roles for each user in MVC5 razor
I am trying to display a row of each user and their roles in the ASP.net MVC application.
Users and their roles are stored in ASP.net membership provider table.
Using the code below I can display each user and the role they are assigned, but my…

snowflakes74
- 1,307
- 1
- 20
- 43
1
vote
1 answer
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 between creating a view and submitting the form…

Dmitriy Reznik
- 99
- 8
0
votes
0 answers
Partial View in asp.net mvc
How to make partial view with a controller which should viewed in every view.
I created a partial view for navbar with a controller for it. I could able to view it in home page but it shows error while moving to next page .The navbar contains an…

vaseem
- 9
- 4
0
votes
1 answer
JavaScript - Multiple Overlapping Async GET Requests?
I have tried ways to search for a solution but I can't seem to find the right combination of words or something... here goes:
I have an ASP.NET MVC application that users scan inventory/package barcodes into. Every time someone scans an item, I make…

FunkiNATEr
- 3
- 3
0
votes
1 answer
ToLongDateString() showing wrong date in Arabic
In my ASP NET MVC Entity Framework project I pass from database date and time information. When I display the date in the Arabic format CultureInfo("ar-AR") I get an incorrect date from what is entered in the database.
My code so…

דניאל
- 183
- 9