The ASP.NET MVC Framework is a Microsoft web application framework that implements the model-view-controller (MVC) pattern. The latest release of the framework offers REST-style web services development capability, also known as Web API.

learn more… | top users | synonyms (4) | asp.net mvc jobs

0
votes
0answers
13 views

Migrate .NET backend architecture to PHP

I have an App of myself developed in .NET and i want to migrate the architecture to PHP and I want recomendations of libraries and frameworks in PHP this are fundamentals of my architecture: -ORM ...
0
votes
1answer
15 views

ModelState Error will keep displaying after refresh the page

I have the following GET Action method:- public ActionResult Edit(int id) { return View(groupRepository.Find(id)); } I have the following POST Action method:- ...
0
votes
1answer
12 views

Is this any issues with passing into multiple domain objects into a ViewModelBuilders in asp.net-mvc?

I have been trying to refactoring my app to support all the things mentioned in this blog post to thin out my controllers. The one issue i wanted to clarify is in the article, the ViewModelBuilder ...
0
votes
0answers
9 views

JsonLogOn via https

I've just introduced SSL to my MVC website. I made the whole default AccountContorller use it. It works fine unless I'm currently on http page and try to log on with ajax (the logon action is ...
0
votes
1answer
10 views

HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents

I have downloaded the MVC Music Store at location C:\Users\DEVESH\Desktop\Projects\MvcMusicStore-v3.0\MvcMusicStore-Completed\MvcMusicStore and added the website on IIS at same location.I have also ...
1
vote
1answer
17 views

ASP.NET MVC Parse json as model

Hello i am trying to make ASP.NET MVC parse a request with json in the data to a model, but for some reason it just won't work. Here is my request $.ajax({ type: "POST", ...
1
vote
1answer
40 views

Need to choose assertion for unit test?

This is my code: public int GetTotalIssuedCount() { var storeCode = Store.Current.Code.ToLower(); return (from i in Context.Instance.EduContainer.IssueDetailsSet where ...
2
votes
1answer
17 views

Change the Currency Symbol thoroughout the Application

I derive the controllers from a base class: namespace merawi.Controllers { public class BaseController : Controller { public CultureInfo trTR = new CultureInfo("tr-TR"); ...
0
votes
1answer
34 views

MVC 4 model in javascripts code

I want to do this if statement below with a value in a model object in razor view. I do not know how to do it though... Anyone has any idea? <script> if (@Model.projects.Count == 1) { var ...
-2
votes
1answer
42 views

VS2010 - Should I use ASP.NET MVC?

I would like to create a Internal(LAN) Web Application. The App and DB will be under same Server. I need some idea should I use MVC ? Thanks and Best Regards Dylan Heng
0
votes
0answers
37 views

AngularJS and ASP.NET MVC integration and bootstrapping

I'm writing a web application that will mainly use AngularJS for its modularity and testability and ASP.NET MVC server side technologies for model validation. The idea is to load PartialViews in ...
0
votes
0answers
12 views

HTMl5 table row grouping

I am using Asp.net MVC4 . I have Razor Index View with HTML5 Table. Now asked to add dynamic (user) grouping functionality to the existing table. Please suggest me / refer me how can I implement ...
0
votes
1answer
19 views

UpdateModel does not work when declaring type is different

Here is code example of what i am asking. public ActionResult Action() { object person = new Person(); //It works if i replace object with Person UpdateModel(person); //this ...
2
votes
0answers
24 views

UrlHelper doesn't use referrer host when generating URIs

I am developing an MVC Web API application that I need to access from web browsers on many different devices, for example, smart phones. During development I want to be able to debug while I access ...
2
votes
1answer
32 views

Load related entities from a Collection in Entity Framework

How do I load related entities from an already loaded Collection: The Collection: public class Ad { // Primary properties [Key] public int Id { get; set; } private ...
0
votes
1answer
23 views

ASP.NET MVC 4 Web API fails to map path containing the string “con”?

What is so wrong about the string "con"? OK, my api route configuration is rather uninteresting: config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", ...
1
vote
0answers
4 views

Can I use npm to manage an ASP.NET MVC Project's Javascript?

I'm developing a large client-side javascript app, which requires a complex tree of Javascript dependencies, all of which are available as npm modules. Most modules I require are not available as ...
0
votes
1answer
21 views

Models Interfering with Partials

So currently in my _Layout file, I have a global login and Register system which will show on every page: <div id="global_login_register"> <div id="login"> ...
0
votes
0answers
5 views

Use DataContext to return dynamic data for jqGrid

I'm trying to create a way to output dynamic results in JsonResult format so that it will work with jqGrid. In my case, I have a simple sql statement in a string: string columns = "userid, username, ...
1
vote
1answer
28 views

Two ASP.NET web applications side by side - Necessarily cross origin?

I created a new solution with two ASP.NET web applications, one MVC application and one Web API. I wanted to access the api using a subdomain like api.mydomain.com/api/cars/1 so I implemented an ...
0
votes
1answer
19 views

asp mvc route behavior

I got a problem with routin in my asp mvc application: The resource cannot be found. Requested URL: /Admin/Users/Update My action code is: [HttpGet] public ActionResult UpdateUser(int userId) { ...
-1
votes
1answer
20 views

Going to an URL without redirecting asp.net mvc 3

I am inside an action in the controller. From that action, I want to go to a url which will run some VB code which will clear some cached content. But I don't want to redirect to the URL or even show ...
0
votes
4answers
52 views

List to CSV and Excel

I have a List<Customer> which holds 5,000 lines where Customer is public class Customer{ public Int32 CustomerID {get;set;} public String Name {get;set;} public Decimal ...
0
votes
1answer
24 views

using dropzone to upload files to database

i am having trouble properly uploading files to database using dropzone js (www.dropzonejs.com) i am not sure how to properly hit the ActionResult <form action="UploadFiles" class="dropzone"> ...
0
votes
0answers
13 views

Custom Events and IoC lifecycle in ASP.NET MVC

The goal is to create some form of Event manager for ASP.Net MVC. The problem, is that the event subscribers (listeners) should be long-lived - preferably with a singleton lifecycle. However, a ...
1
vote
1answer
28 views

How to include more than 1 model object in a strongly typed view?

When I create a strongly-typed view from an ActionResult function, the Visual Studio dialog for creating views only allow me to include one model object. How do I include more than 1 so I can use ...
0
votes
1answer
16 views

return dynamic list back to mvc post call

i have a list of questions that is being sent to my view that is dynamically created. Some times there will be 5 questions, sometimes there will be 20 questions. The problem i'm having is passing the ...
0
votes
3answers
30 views

How Entity framework works with lambda-expressions in ASP.NET MVC

I'm working with EF code first. There are two classes which define my many to many association tables: public class UserProfile { [Key] ...
0
votes
1answer
36 views

What are the guidelines on using templates via lambdas in Razor (ASP.NET MVC 4)?

I am not able to find anything on MSDN that sheds some light on how the following feature is supposed to be used: @{ Func<String, HelperResult> a = @<div>@item</div>; } @a("Hey!"); ...
1
vote
3answers
125 views

WebApi: verification of json signing

I am working on and Web API in ASP.NET MVC4 using ApiController classes. The API will have authentication checks based on signature verification. Every request has to be signed using POST body and ...
1
vote
2answers
44 views

Setting the default value to a select list

I have this list of string: public static readonly List<string> LIST_ITEM_STATE = new List<string> { "Brand new", "Never used", "Slightly used", "Used", "Heavily ...
0
votes
3answers
22 views

Error in connecting aspx.cs to database situated in app_data folder [database connection error]

I am trying to connect database using asp.net, but I am getting following Exception: System.ArgumentException: Invalid value for key 'attachdbfilename'. objconn.ConnectionString = "Data ...
1
vote
1answer
27 views

ASP.NET MVC Session Based Model Binder - Update Value Back to Session

Based on Steve Sanderson's sample in his book, He provided sample how to implement custom model binder by using session. of course it needs to register in global.asax.cs. public class CartModelBinder ...
0
votes
3answers
75 views

C# asynchronous method - help needed

I have an asynchronous method that consumes a Web API action. It appears to be stuck in a loop. My reasoning for this is because if I put a break point on line 1 of the catch block, and step into, it ...
2
votes
1answer
26 views

Syntax error when binding a model object to a JavaScript array

I am trying to bind a model object to a javascript array: <script type="text/javascript"> var tests = []; tests = @Html.Raw(new JavaScriptSerializer().Serialize(Model.TestList)); ...
1
vote
2answers
54 views

BackgroundWorker in MVC pattern

public ActionResult Index() { BackgroundWorker bw = new BackgroundWorker(); bw.DoWork += new DoWorkEventHandler(Domail); bw.RunWorkerAsync(); Return View(); } private void ...
0
votes
1answer
13 views

Uri.Port behaviour in different enviroment

I'm using the property Uri.Port in MVC 3 to get the port of my ASP.NET Development Server. However, I was wondering if, when going live on the Web, I will need the Port #. Also, what does this ...
1
vote
2answers
47 views

C# MVC ActionResult that returns multiple files

Can an MVC ActionResult return multiple files? If so, can it return multiple files, of multiple type? Examples: Can an ActionResult return myXMLfile1.xml, myXMLfile2.xml, and myfile3.xml? Can an ...
0
votes
0answers
15 views

Trade-off between defining a BIND list inside my model class, and the ability to edit the object

Currently on the model class level I have excluded from the model binder any attributes that should not be defined by users, such as CreatedDate or any navigation properties objects. So inside my ...
0
votes
0answers
21 views

ASP.NET Web Api - testing Post method with writing to text file

This is my Post method which gets information about phone and return offer for this phone (for now it's just basic): public ActionOffer Post(MobileInformation mobileInfo) { var ...
0
votes
0answers
14 views

Two tables succesfully associated and models auto created (vis studio) how to, use the two tables as one in a controller?

Im new to MVC and entity framework, ive just created a ADO entity in visual studio, created assoications and done the table mappings for my two tables tblUsers and tblItems i right clicked and added ...
0
votes
1answer
40 views

Array Binding in MVC

I'm trying to pass an object from Javascript to my controller. The object is getting recreated just fine, except for a contained array of objects that aren't being recreated properly. I have a class ...
3
votes
1answer
44 views

Razor syntax error serializing ASP.NET Model to JSON

This line is giving me a syntax error in Visual Studio 2012 (literally just 'Syntax Error'): var data = @Html.Raw(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(Model)); Model ...
0
votes
1answer
21 views

Passing a class object from one controller action to different controller action in ASP.net MVC 4

I want to pass a class object from one controller action to different controller's action. Sender Action public class CourseController : Controller { [HttpPost] public ActionResult ...
0
votes
1answer
49 views

DropDown not displaying what was previously selected & saved

The customer can view their cust details page where they can change their pre-recorded delivery run (if they wish too) I have a drop down list containing towns for delivery runs: <div ...
1
vote
1answer
23 views

Uncaught TypeError: Cannot set property 'unobtrusive' of undefined

I am using the latest MVC framework and bundles. The default "jqueryval" bundle that MVC creates is causing a javascript error The scripts on my page are output like so <!-- In head --> ...
0
votes
1answer
10 views

asp.net mvc 3 Save button that links to specific page after saving

I have a save button that saves values entered by the user to a database. I would also like to have the button link the user back to the home page when pressed if the values have been saved ...
0
votes
1answer
37 views

Change the datetme2 format on the model object level

I have a datetime2(7) on my asp.net mvc. But currently the date is saved in the database as:- 2013-07-12 14:27:47.7934737 While on the razor view it will be displayed using @String.Format("{0:g}", ...
0
votes
1answer
15 views

Can I make DisplayNameFor(T) and LabelFor(T) produce separate results?

I have some Create views and some Index views for my models, but I want different labels (generated from data annotations). E.g. I want @Html.DisplayNameFor(model => model.Url) to print something ...
0
votes
0answers
15 views

Chrome: PDF from HTTP Post Initiates Extra HTTP Get (ASP.NET MVC)

We have an app that allows you to click a button at which point we create a form using javascript with a target of _blank so it will post to a new tab/window and then we attach it to the page and ...

1 2 3 4 5 1262
15 30 50 per page