3
votes
3answers
49 views

How to Duplicate an Action in same Controller using MVC

I have 2 actions in one controller public ActionResult DoSomething() { ... } public ActionResult SoSomethingAgain() { ... } I would like to have both requests go to the same action. ...
0
votes
1answer
25 views

MVC wire format model binding and validation

How do you deal with model validation when using the wire format model binding. I am looking to have validation messages in the validation summary area and highlight the affected input field that has ...
0
votes
2answers
22 views

CS1973 error when trying to implement a ListBoxFor

I'm trying to implement a very simple multiple select in .NET where the drop-down values are dynamically created. The Code: I created a View Model: public class FiltersViewModel { public int[] ...
0
votes
1answer
26 views

Get Data from HttpGet Action Method and pass them to HttpPost Method

I am just asking myself wether it is possible to get values from an HttpGet Actionmethod and pass them to the HttpPost Actionmethod. Here is the Code: ContactAdminController public class ...
0
votes
2answers
19 views

log4net rolling file appender (by date) overwriting existing file

I've currently got a log4net rolling file appender, based on date that should be rolling over each day. It has been doing that for months without a problem - but in the last week it has begun ...
2
votes
0answers
21 views

Can the C# MongoClient be used to return valid JSON without first serializing to a .NET type?

I would like to have ASP.NET MVC return a document stored in MongoDB as JSON, but have no need for it to be serialized to a .NET type first. However, BSONDocument.ToJSON() returns JSON that looks ...
2
votes
2answers
60 views

ASP.NET MVC 4 - Proper way to respond in HTML, JSON, or XML

What is the correct way to have my Index() method return content based on the incoming accept/content-type headers. I currently have an application I am trying to refactor that has an Index() method ...
0
votes
3answers
46 views

Why does the HttpGet method get invoked again when the form is submitted with POST verb?

Controller: // other usings are removed for the sake of brevity using MvcMovie.Models; namespace MvcMovie.Controllers { public class MoviesController : Controller { private ...
0
votes
2answers
33 views

Remove one occurrence of an item in a list containing many occurrence

In my app I have a class that contains a list of these items: public class Order { (...) public List<OrderDetailInfo> mListOrderDetail { get; set; } } And an orderDetail if shaped ...
0
votes
3answers
63 views

How return list from one class to other class

I want return list to other class->method I have method in one class public static List<StatsList> GetAdsStats(string Ticket, DateTime start, DateTime end, int CamId) { var client ...
0
votes
0answers
21 views

Cancelling a long running WCF task from MVC [duplicate]

I have a long running task on a "per call" WCF service like this: public Task PerformLongRunningTask() { return Task.Run(() => { for (int i = 0; i < 100; ...
1
vote
3answers
64 views

How to clean dictionary by deleting old elements from it

Given is Dictionary<T, U> in asp.net application. Application is running for a long time and new elements will be continuously added to the dictionary. My goal is to keep so many elements in ...
0
votes
1answer
19 views

How to generate web links and embed them in a JSON object (C#, MVC)

I am working on a C# MVC application. I am new to this technology, but I have significant web development experience in other languages. I would like to refresh the content of a page dynamically ...
0
votes
1answer
24 views

Nhibernate EagerLoad on demand

I am new to fluent nhibernate and encounter the following NHibernante error : Initializing[Toto.Business.Catalog.Unit#059fb247-df11-4457-8a4d-7c8b984a155e]-failed to lazily initialize a collection of ...
0
votes
3answers
35 views

ASP.Net MVC Postback from View to Controller shows null values

I've a problem with ViewModel posting back to a controller, but the ViewModel not being mapped correctly from the View to the Controller. TopicId and Content should contain values, however, when ...

1 2 3 4 5 964
15 30 50 per page