Questions for


Implement Repository Pattern in Asp.Net MVC with SOA architecture

We have starting new project in our company. We finalize the architecture as follows

Entity Framework SQL Server increments an Id Key out of order if previous values are available

I have an MVC4 website and it has a SQL Server DB that contains its posts. On each post there is a Next and Previous button. These buttons are calculated from databaseContext.Post.Count() plus or m...

.NET MVC4, Entity, Search

I have an MVC4 project using EF. I have set up my schema so that all searchable items have have a Table that relates them to a "Tags" table. I am wondering what is the most efficient way to do a full

How to implement custom OpenID Relying Party in MVC 4

I like the new MVC OpenID/OAuth login feature, but I want to know how to add a new login button, for example I want my users to login using their StackExchange account or using their OpenID url the...

Use TypeScript in ASP.NET MVC

How to effectively use TypeScript with ASP.NET MVC?

MVC 4 jQuery modal dialog

Is there a way to get a jQuery modal dialog to be "truly" modal?

Update view's model or datatable for client updates?

In a web page, when a user deletes rows from a datatable, should I be using the view's model or the datatable to do the data manipulation? (I'm learning MVC 4, and I'm not sure if accessing the model

How to Secure WebAPI with Single-Page

I'm building an application with an MVC4 single-page front end and a WebAPI on another machine that returns json query data directly to the browser. The authentication happens on the MVC side where a

Why is my razor view complaining “} expected” after upgrade to razor 2 / mvc 4?

I have an existing razor 1 / mvc 3 view, with a few nested if - very simple, but after upgrading to razor 2 / mvc 4 it is complaining at runtime and compile (BuildViews) about } expected. It used t...

Print inner text of a HtmlContent in a razor view (MVC4)

Using MVC, look at this example where we have the following HTML code:

C# Linq To Excel Getting Table Data Not Starting In The First Row

I'm developing a MVC 4 web application and one of the requirements is to allow users to upload an excel file which is in a standard format and extract data and save that to a database. I have used ...

How can I raise an http 404 from a FileStreamResult?

Normally I'd return HttpNotFound() but my method returns a FileStreamResult and I get

Extending @Html.DropDownListFor

I would like to use the following code by extending the @Html.DropDownListFor helper.

Visual indication of selected list item

I am very new to jQuery mobile and even newer to knockout.js. Now, I am to develop a website for mobile devices using mvc4 framework.

Custom model error text in MVC 4

Background: I am extremely new to MVC, c#, and .net in general. I am working from the MVC4 internet application template in visual studio 2012.

Clear text with JavaScript in MVC 4

I've the following search box:

System.Data.SqlClient.SqlException: Invalid column name 'Email'

I'm working on a new ASP.Net MVC 4 app and testing user login. I am getting following exception:

MVC Dynamic Form Fields

I have read this article which shows how to display dynamic fields via the use of editor templates

How to force BundleCollection to flush cached script bundles in MVC4

... or how I learned to stop worrying and just write code against completely undocumented APIs from Microsoft. Is there any actual documentation of the official System.Web.Optimization release? 'cu...

Oauth In Webapi?

I am learning how to use the webapi. I want to make an admin area where I can do admin stuff but also add,edit,delete stuff into my database.

how to get URL with two parameters in javascript?

i works in a MVC 4 project, and i have a small problem in my script, this is my script :

how can I bind a complex class to a view, while preserving my custom validation attributes?

In my project I have a model class that uses another class, like in the sample below.

Convert My MVC4 Web appication to android?

I have a web application developed on .NET Framework using MVC4. So now I need to create a Android Application for it. So as I have only 1 month experience in Android development. I need some help....

Upgrading from Entity Framework 4 to 5 resulted in error

After upgrading to EF 5 I keep getting Validation failed for one or more entities. See 'EntityValidationErrors' property for more details' in a particular instance of my code.

How i pass the data from windows popup to controller

I have create a popup windows called AddCust.cshtml. Once the user clicked btnSaveConsumer it should picked up all value entered. But i am not sure how to pass the controller. I tried to used the

ASP.NET MVC Blog plugins?

I'm working on an ASP.NET MVC project.

Adding stored procedure in sql server compact, MVC4

I am new to mvc platform and wanted to try something out.

Passing a list of objects to JavaScript from Controller method using Ajax

I have a controller method GetNearbyUsers which returns a list of users as a JsonResult. I am trying to call the method using the following ajax function:

Client Side validation using jquery in MVC4

I am very new to ASP.NET 4 and MVC 4. I have a requirement of client-side validation using jQuery. Can some one please help me with a very basic code implementing of client side validation for exam...

How to get a specific row from database in MVC 4

I have a model called PageModels

Implementation of two legged OAuth 2.0 for WebApi

I created a mvc4 webapi project using VS2012RC. I tried to implement two legged Oauth 2 in my project. I followed the tutorial

Want to Save Posted Json data to database

I am posting JSON data through AJAX POST as ::

What is the string format to display the zeros (minimum 3 digits) after the decimal point in cshtml view page?

If the value is 3, then it should be display as 3.000, that is minimum to three decimals.

How to clear browser cache on browser back button click in MVC4?

I know this is a popular question in stackoverflow. I have gone through every same question and I am unable to find the right answer for me.

How can be home controller define as root also when action have params? asp.mvc 4

By default if url is 'mydomain' it go to controller home; action = index.

ASP.NET MVC 4 - Add Bundle from Controller?

I have some pages on my site that use certain CSS and JS resources - but they are the only page(s) to use that css or js file - so I don't want to include that CSS and JS reference in every page. R...

Mvc4 having 2 forms in one view

So i'm building a simple mvc4 application, I have created all base models for the creation of the DB, from these classes I could naturally create basic controllers with their matching views.

How do I inject an HTTP-Request-specific object into my Unity supplied object?

For example, I store the "current user" in Session. The business-layer object are being instantiated by Unity. How do I make the business-layer object aware of the "current user"?

Why is MVC 4 Razor escaping ampersand when using HTML.Raw in a title attribute

We recently upgraded to MVC 4 and now we are having titles in our links not display correctly. The problem is before HTML.Raw would not escape & in our title attributes, but now it does. Below ...

Rendering an html string to view

I have two controller actions that target the same view. That is, I have specified a view name on the call to View from controller action. The second action puts an html string in a ViewBag. I si...

Nuget autoupdate in website

For a customer we are trying to build a webb application that they can build patches (new versions) and their customers can by them self by a click in the app update.

Access Data from First recordset

I have a LINQ query that returns a few rows. It has a join so that it includes company contact information along with the detail records (so the contact info is repeated for every row). On my vie...

Dynamically accessing properties of knockoutjs observable array

I am using the below code for handling sort functionality. It is working for me. But is there any way to make the code as common and so i can use it whenever needed.

MVC4 Passing model from view to controller

I have a view with a model populated with data relating to booking a taxi.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.