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 (6) | asp.net mvc jobs

0
votes
0answers
16 views

ASP.NET MVC Lowercase URL without affecting parameters

I'm currently using ASP.NET MVC 4 Routing with the LowercaseUrls option set to true and it's working great. I have this configuration: routes.LowercaseUrls = true; routes.MapRoute( ...
0
votes
3answers
14 views

Web API custom validation to check string against list of approved values

I'd like to validate an input on a Web API REST command. I'd like it to work something like State below being decorated with an attribute that limits the valid values for the parameter. public class ...
0
votes
0answers
36 views

An item with fields modified does not update after being multiple items are saved simultaneously

In my app I have to modify an order. An order contains a list of order details (so they are "children" of an order) and an order detail, in this cause, add a quantity to an inventory Item. Now let's ...
0
votes
0answers
18 views

ASP.NET MVC - Profile Image / File Organising

I'm currently building into my app a method to allow users to provide images for their profile. As part of the upload process I'll be creating a couple of different versions of the file for use in ...
0
votes
4answers
48 views

Ajax not returning Partial View

I reallly have a simple set of code to bring back a set of data that is triggered off a drop down. this is the script: function () { $('#ProviderID').change(function () { $.ajax({ ...
0
votes
0answers
33 views

Update an item but insert if it does not exists

How can I update an item but insert it if it does not exists in my context? Is there any command for that or I really need to do 2 passes? something like context.Users.UpdateOrInsert(user); or i ...
0
votes
1answer
19 views

Render scripts for use in Partial View?

I've seen numerous sources stating that it's incorrect / bad practice to put scripts in Partial Views, but this raises a huge question... How are you supposed to run scripts that interact with ...
0
votes
0answers
11 views

Integrate paypal 'Buy now' button programaticaly

In my site I am integrating paypal buy now button programaticaly. this is what I have: <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" style="margin-top: 30px;"> ...
2
votes
1answer
12 views

Security exeption in Azure Cloud Service

I have developed an Azure Project bind to an ASP .NET MVC4 application using Entity framework CodeFirst, when I deploy my Azure Cloud Service in local it works well, but as soon I deploy on Azure it ...
1
vote
1answer
16 views

Build a App that accepts language pack

I'm quite lost here and I need guidance. I need to build a web app that will support language packs... the idea is to start with a default language such as English, and then the client will be able ...
0
votes
2answers
28 views

Whats the difference of using a context like these two approach

Whats the difference of using a context like these two approach public class MyController : Controller { MyContext db = new MyContext(); public ActionResult Index() { return ...
0
votes
0answers
55 views

MVC4/EF/POCO/MySql “Given assembly name or codebase was invalid”

im trying to use MySql database with MVC4 EF Code-First. much like http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/intro-to-aspnet-mvc-4 Error: "The given assembly name or ...
0
votes
2answers
27 views

Can we authenticate a user in MVC like this?? If not whats the issue

[HttpPost] public ActionResult LogOn(LogOnModel model) { if (ModelState.IsValid) { if (AuthenticateUser(model))`enter code here` { return View ('HomePage') ...
0
votes
1answer
12 views

Kendo UI Grid MVC Helper how to NOT render “type”: “aspnetmvc-ajax”

So I've been trying out the Kendo UI grid and I initially started with just the plain non-MVC helper generated client side grid, taking data from a Web API controller via GET. Worked just fine but was ...
0
votes
0answers
28 views

accepting uploaded files in MVC

I have two controllers that accept same file uploads so I would like to extract the logic for handling uploads into a separate function. Currently my action for one of the controllers looks similar to ...
0
votes
1answer
39 views

JavaScript is Doing a Post on Server Side Twice

Student Data Grid that display the student id and a description in the grid. It also has a select button when the user click on it that would route to a javascript function. This function will set ...
0
votes
3answers
25 views

Confirmation to pause form submit until Ok has beenpushed

I have a form that a confirmation dialog pops up (do you want to continue) right now it pops up but the form is being sent to my controller at the same time, which begins processing regardless if you ...
0
votes
0answers
8 views

Get a testable attribute for RedirectToAction method?

I'm trying to test my controller, which is used for registration of new users. [HttpPost] public ActionResult Register(ClientViewModel clientViewModel) { if (ModelState.IsValid) ...
0
votes
1answer
27 views

Join issues - three tables

I've got two models, Category and Subcategory, a one to many relationship. Then I've got a model called Notice that has a one to one relationship with Subcategory(SubcategoryId as FK). Users adds ...
0
votes
1answer
21 views

What is the correct place to dispose a repository created in a custom controller factory?

In my ASP.NET MVC project I use a custom controller factory that instantiates an Entity Framework-based data repository and passes it to the controller's constructor. The repository object implements ...
3
votes
0answers
13 views

Unobtrusive client validation data attributes are not rendered for nested property rules

Using FluentValidation 4.4, the following rules emit the correct unobtrusive validation data attributes on input fields: RuleFor(e => e.PrimaryContact).NotEmpty(); rendering the following html: ...
0
votes
2answers
17 views

Any way configure to configure visual studio mvc build views release mode

Is there any way to configure visual studio to compile views when compiling for release mode only. It seems that its all or nothing and for my project which has lots of different views it just bogs ...
0
votes
0answers
7 views

Kendo Ui Splitter , Panel Bar and Iframe

I am having a kendo UI Splitter with left pane and right pane. In the left pane I have kendoui Panel bar which consists of links to different reports. Now onclick of any link I am trying to open the ...
-6
votes
1answer
78 views

What is the purpose of IEnumerable in this code snippet [closed]

The code below is corret, but I couldn't understand how this works. If anyone could explain the purpose of IEnumerable<T> in my code. public class ShoppingCart : IEnumerable<Product> { ...
0
votes
1answer
26 views

How can I use a helper function inside Razor?

I'm creating a website using asp.net. I first created some models, this is one of them: public class User { [Key] public int UserID { get; set; } public string UserName { get; set; } ...
0
votes
2answers
38 views

When should I create a model in MVC?

I am just getting started with ASP.NET MVC. So far I like it a lot. I am trying to get up to speed but I need some clarification. I want to know when should I create a model for the logic. I mean so ...
-1
votes
0answers
16 views

.net mvc Delete local file after uploaded to azure

I am using the uploadifive to upload files into my local folder. after uploading i will upload that files to the azure storage. this flow works perfectly. The problem is, when i try to delete the ...
0
votes
3answers
47 views

How to send data from view to controller on button click

How can I invoke controller action and send which values are selected in drop down lists in time when button was clicked? Here is example how my .cshtml looks like. This is just example, generally I ...
0
votes
1answer
12 views

Generating admin user from the Seed() method

I'm building a project where the user can access a CMS like admin system (I'm using the built in login that comes with MVC 4 projects). Each site will store the data in it's own SQL CE database. I ...
1
vote
1answer
21 views

How to handle exceptions that are not thrown by controllers?

Consider this piece of code. protected void Application_Start() { InitLogger(); InitAppContext(); AreaRegistration.RegisterAllAreas(); ...

1 2 3 4 5 2065
15 30 50 per page