Tagged Questions
ASP.NET MVC 4 is the fourth major version of the ASP.NET Model-View-Controller platform for web applications.
0
votes
1answer
13 views
Run Code When a Partial View is Shown
First, I'm sure I'm missing a best-practice way to navigate to and load partial views. So, if I'm going about this all the wrong way, please let me know. I have a feeling I'm making this more ...
1
vote
0answers
15 views
javascript error when launching fresh new MVC4 application in IE10
I'm getting the following error when launching my MVC4 application. Can some one shine some light? Nothing has been added yet by me. It was working fine yesterday. I tried creating a fresh new MVC4 ...
0
votes
1answer
7 views
Knockout and observablearrays using mapping plugin
the below code is working fine when i call it at the first time, however in the second call the gridviewmodel becomes messy and all data become redundant
$.ajax({
url: 'rest service uri',
...
0
votes
0answers
10 views
Use ASP NET configured JSON MediaFormatter
I have my json media type formatter configured in my global.asax as usual
Dim jsonFormatter = config.Formatters.OfType(Of JsonMediaTypeFormatter).First()
...
0
votes
1answer
22 views
Serialize c# array of strings to JSON array
i have the following code in my _Layout.cshtml file. The idea is that in my javascript code some items about the security are filled in. LoggedIn and username are obviously no problem, but the way ...
1
vote
1answer
17 views
How can I associate an object that will be inserted into the database with one that has not yet been inserted using Entity Framework?
I am attempting to implement auditing in my MVC 4 with EF application as per this post http://jmdority.wordpress.com/2011/07/20/using-entity-framework-4-1-dbcontext-change-tracking-for-audit-logging/.
...
0
votes
0answers
20 views
Why do the original values of a DbEntityEntry match the new values?
I am attempting to implement auditing in my MVC 4 with EF application as per this post http://jmdority.wordpress.com/2011/07/20/using-entity-framework-4-1-dbcontext-change-tracking-for-audit-logging/. ...
0
votes
1answer
16 views
Assigning ViewBag property in javascript
I am trying to assign a JS variable to a ViewBag property and use that property in an Html ActionLink.
However, I'm getting a design time compile error: "Syntax error" right below the getJSON method ...
0
votes
0answers
8 views
How to set permissions dynamicaly in Microsoft.AspNet.Mvc.Facebook.FacebookAuthorize?
Controller
public partial class HomeController
{
private static String[] userPermissions;
public HomeController()
{
var MyPermission = ...
2
votes
1answer
16 views
Style bundling not working after IIS deployment (MVC 4)
I'm having troubles with my style sheets bundling after deployment to IIS.
I've created a simple solution to demonstrate my problem.
I've created a simple test project (VS 2012, MVC 4) with a single ...
0
votes
0answers
25 views
DOM not updating correctly when altering knockout bindings with jQuery?
As a follow-up to this question: Updating a Razor Model from Javascript
I'm trying to - upon AJAX success - alter the data-binding of a razor-generated list item with jQuery. Here's what I have in ...
0
votes
1answer
18 views
Updating a Razor Model from Javascript
Here's the situation: I have a Razor-generated list of items (that needs to stay Razor-generated):
@model MG.ViewModels.Profile.ProfileDetailsViewModel
foreach (var interest in Model.Interests)
...
0
votes
0answers
6 views
MVC4 Multiple Domains routes with one of the domain having sub domains
How to add multiple domains to MVC RouteConfig when one of the domains has sub domains?
requirement:
ex: www.abc.com and www.def.com should point to one global.asax
www.abc.com points to abc ...
0
votes
1answer
17 views
Reading images from div in controller
I have created a index page
<body>
<div>
<script src="~/Scripts/jquery-1.7.1.js"></script>
<style>
.thumb {
height: 75px;
border: 1px solid ...
0
votes
1answer
12 views
ASP.NET MVC4 ActionFilters
I have an ASP.NET MVC4 application. I created a Login page. If a user log in to the system, I register user's information in to session. I added a filter for checking session variable. If user didn't ...