1
vote
0answers
9 views

RequestContext is null in service ServiceStack

It was working then it suddenly stopped working. I must have did something. I'm calling my service from an MVC controller. I'm using NHibernate with a service runner I found in this SO answer public ...
0
votes
2answers
50 views

ASP.NET MVC Best Practices

I've been working with ASP.NET MVC more and more and I am just loving it. I did want to know what practices others try to follow. My last project is a survey site where users can create and take ...
0
votes
2answers
39 views

How do i pass values through razor in mvc4

I'm having a difficult time with Razor and how it passes values back to my controller. I have the following code <div data-role="fieldcontain" class="inline-toggle"> <label ...
1
vote
1answer
24 views

C# Active Directory authentication

I have a heavy client side webapp in AngularJS. I'm using a C# controller to do Active Directory authentication, here is this code. public UserModel Get() { UserModel currentUser = new ...
2
votes
4answers
68 views

How to handle an edit and delete button on the same form in ASP.NET MVC?

Consider the following markup: <h2>Edit SAS Program</h2> @using (Html.BeginForm("Edit", "SasProgram", FormMethod.Post)) { <label for="Name">Name</label> ...
0
votes
2answers
32 views

Better loading performance with EF code first and MVC 4

I am trying to make better (= faster) response in my MVC 4 project and mainly in Web Api part. I added MiniProfiler to see where is problem with slow loading but I can't figure out. ...
0
votes
1answer
36 views

Custom validating a Model object in MVC

I I need to validate some thing in mvc in my controller I have to @Html.ValidationMessageFor(model => model.somestring)// in the view if (model.string = some condition) ...
0
votes
0answers
40 views

Deleting a Model object navigation property

I have a table named Group and another table named UserGroup. Now I need to delete all the UserGroup objects that have a specific GroupID, I am currently doing the following: public void ...
0
votes
1answer
49 views

How to add an image to a dialog form with jQuery

I am working on MVC application and on one of my pages I have an image gallery. I want to do the following: when I click on any given image to open a modal dialog and display the image (the reason for ...
1
vote
3answers
58 views

MVC using methods from a helpers namespace

I have the following in ~/Helpers/Helpers.cs: namespace AdjusterSave.Helpers { public class Helpers : Controller { // various methods such as the following... public void ...
0
votes
1answer
28 views

ASP.Net MVC SimpleMembershipProvider and using Roles

I would like to user the [Authorize] on my controller actions, to only let selected people in specific roles access the controller. Example: [Authorize(Roles = "Admin, User")] Prior to ASP.Net 4, ...
-4
votes
0answers
50 views

How to prevent project creation from published dlls [duplicate]

I am working on asp.net mvc. I have created a project using asp.net mvc and visual studio 2012 and I always prefer to publish the project rather direct source code when I upload to server or setup the ...
0
votes
1answer
33 views

Entity framework Lazy Loading incorrect behaviour

in my controller action I'm trying to add new image to database. Image requires to be associated with the device, which is associated with the user. So I have my entity classess: public class Image ...
0
votes
2answers
35 views

Fastest collection for collection of items which each has collections of items to iterate through

I have a small collection (about 10 items) that each has a medium collection (from 200 to sometimes 500) of items linked (Many-to-one relationship, if I'm correct). I am looking for a way to ...
0
votes
1answer
72 views

Converting a list in c# to a table in javascript

I have an asp.net mvc application with razor view's engine. I need to store the values of a list passed as a model in my view by using javascript @section logout { <a ...

1 2 3 4 5 993
15 30 50 per page