Many people have written about using Automapper to map domain objects (models) to view models, which I find very interesting and useful, but my question is about how to do the opposite. I understand the complexity of this process and why Automapper doesn't work in that scenario but I have to do that a lot with form posting, specially whe...
I see a lot of the multi-core information on the web applied to desktop applications - but I am interested: what tips and pointers would be useful for ASP.NET MVC web developers building applications that make the most of multiple cores/processors?
...
Calling
http://foo/home/cachetest
for
[UrlRoute(Path = "home/cachetest")]
[OutputCache(Duration = 10, VaryByParam = "none")]
public ActionResult CacheTest()
{
return Content(DateTime.Now.ToString());
}
will show the same content for every 10 seconds no matter how often i refresh page.
Is it possible to easily add sliding exp...
I'm including a feature in my web application that notifies a user via e-mail.
Now that I want to HTML format this e-mail, I'm wondering whether it is viable to re-use the core functionality of ASP.NET MVC and have a partial view rendered to a string, so that I can make a partial view with the content of the e-mail. The code in the Ser...
Hi all
Ive been doing a bit of research / reading into mvc recently and was just wondering what the main purpose is.
is it as some people say to seperate the logic from the html
or to create clean url's
i could be missing the point completely, but asp.net forms really seperates the logic from the html and if you just want clean ur...
I have an issue where I'm creating a greenfield web application using ASP.NET MVC to replace a lengthy paper form that manually gets (mostly) entered into an existing SQL Server 2005 database. So the front end is the new part, but I'm working against an existing moderately normalized schema. I can easily add new tables, views, etc. to ...
I'm working on an ASP.NET MVC task list and I'd like to get fancy with the URL routing when filtering the list. I have an action method defined like this:
public ActionResult List(int categoryID, bool showCompleted, TaskFilter filter);
enum TaskFilter { MyTasks, MyDepartmentTasks, AllTasks }
I want my URLs to look like this:
/Tasks/...
Hi,
I am developing my first ASP.NET MVC application and I beleive that Script# can help me a lot. But it cannot find the resource necessary to support my development.
I could not find The codeplex site;
There is only one manual, which is very good, but it is not enough;
I could find very few tutorials;
I know that Script# was used to ...
First, let's see the following picture that explain the concept of .Net RIA Service.
As you see, the application has app logic (business rule) that can be implemented both server side (databases + Repositories + external services) and client side (asp.net web page + Silverlight + WCF)
Next, I create some data class that contains som...
Given that the only way to unload dynamically compiled assemblies (to reclaim memory) is to unload the app domain, how does SharePoint rely on VirtualPathProviders, for master pages and page layouts in particular, without bumping into this limitation?
The restart can be delayed through various settings but not avoided completely when ma...
I am designing a product management system. I am wondering the best way to handle a large amount of variation in each Action/View in my application. The app handles 20 categories and 12 Target Markets, each of which affect the data that needs to be collected for each product. For example, the "QuickAdd" action takes in the core data like...
I am using VS2008 Team System.
I am unable to find MVC Web Application template to start a MVC app. Do I need to install it separately?
...
I'm extremely annoyed with the way Visual Studio works when I write inline C#/MVC in the View. I think the source is horrendous to look at, and I wonder if there aren't some alternatives available, to make the View-code look prettier.
Perhaps some kind of extension-language or pre-processing formatting...
** EDIT **
Found:
Spark
NHa...
Hey guys,
I have a Regex based whitespace filter on an ASP.NET MVC application, and it works perfectly, too perfectly. One of the things that gets filtered are the \r\n characters. This effectively makes everything in one line of source code, which I love because I don't have to deal with quirky CSS because of the whitespace, but in cer...
Hi,
I have set up a form using TinyMCE in my MVC website. To do this, I have an ajaxForm in a partial view like this:
<% using (Ajax.BeginForm(
(Model.ViewMode == ViewMode.Insert) ? "Create" : "Edit",
new AjaxOptions()
{
UpdateTargetId = CustomerVie...
I am trying to trace through why my ASP.NET MVC 2 validation isn't working, but I cant find enough about HOW it works to be able to do this.
I have followed the steps in this useful article by David Hayden which seems to be the best documentation currently out there, but nothing actually happens.
I get validation when i submit to the s...
I've following code in my aspx file.
<% using (Html.BeginForm())
{
int i = 0;
%>
<% foreach (var item in Model.Educations)
{ %>
<fieldset>
<input type="hidden" name="educations.Index" value="" />
<p>
<label for="PID">
PID:</label>
<%= Htm...
Hi,
are there Application variables in ASP.NET? I want to store for all Users an Object which should be independent updated every 5 Minutes. But all users should always see last version of it. Any suggestions (C#)?
...
Is there a way that I can see, while debugging, the result (html, xml, json) of a Controller's action.
For instance, I have this in my controller:
public PartialViewResult Reload()
{
return PartialView("Index");
}
While debugging, I'd like to see what HTML will be sent back to the client.
Thanks
...
I am using "Single data context per atomic operation" approach while using Linq to Sql in an ASP.NET MVC application.
So far, I have been using a singleton datacontext, which I learnt has many issues, so I refactored the code to use single datacontext per atomic operation.
An example of a controller action is now as follows (refactorin...