For background, i have a Data layer and Service layer loosely based on Rob Conery's Storefront model and like Rob's, many of my domain objects and chained with LazyList<>'s and LazyItem<>'s to make use of the deferred execution that Linq2Sql provides given that my Lazy* types utilise IQueryable<T> rather than this awesome delegate approa...
Is there a way to add an Attribute on the Controller level but not on a specific action. For example say if i had 10 Actions in my Controller and just 1 of those Actions does not require a specific attribute I created.
[MyAttribute]
public class MyController : Controller
{
public ActionResult Action1
public ActionResult Action2...
Is it allowed to put System.Web.Mvc in the GAC? Allowed as in: does it work?
I have done this and all my projects have problems inheriting from System.Web.Mvc.ViewPage...
EDIT
Hope this doesn't scare you:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE> "c:\WINDOWS\Microsoft.NET\Framework\v3.5\vbc.exe" /t:library /utf8output ...
I am using FckEditor in Create.aspx page in asp.net mvc application.
Since I need to show rich text in web pages, I used ValidateInput(false) attribute top of action method in controller class.
And I used Html.Encode(Model.Message) in Details.aspx to protect user's attack.
But, I had result what I did not want as following :
<p> H...
I'm creating a HtmlHelper extention that should create a set of links pointing to the current URL, but that have a different language code as their first parameter.
The languagecodes are passed in as a list.
Currently I require the UrlHelper to be passed in and do the following:
/*Warning: HACK*/
RouteValueDictionary vals = html.ViewCo...
from the free dinner book for asp.net MVC
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(int id, FormCollection formValues) {
Dinner dinner = dinnerRepository.GetDinner(id);
UpdateModel(dinner);
dinnerRepository.Save();
return RedirectToAction("Details", new { id = dinner.DinnerID });
}
how to convert this line...
I have an html form in a view that needs to be reset from time to time. Problem is, fields enable/disable based on input. Therefore, the only way to truly reset the form is to reload the view (I would prefer that the entire page is reloaded). Due to several scenarios, simply refreshing does not work. I need the equivalent to Response...
I am placing user data in the session then passing it to viewdata to view on a page. Now when my user walks away from his computer for a while, the session ends and the data he entered is lost.(that is ok) The problem is that when he returns he refreshes the screen my page is still showing but all the data is gone. So,
How can I redirec...
I have an ASP.NET MVC application which is using Linq to SQL classes placed in the Model folder.
I want to create some extra classes that I would normally place in my BLL but I'm not sure how to work this with MVC.
With WebForms I would have my DAL as a Class Library.
My BLL as a class library that referenced my BLL.
My Web Site that ...
I've just had an interesting thought.
It has been a while already since some of us have enjoyed the new MVC framework for ASP.NET. We have talked about it, compared them, liked or disliked one or the other at a different point of time, argued about them each protecting his own point of view. Now it is somewhat silent. He who wanted to g...
I am trying to implement a strongly typed master page and using this page as an example:
http://stackoverflow.com/questions/768236/how-to-create-a-strongly-typed-master-page-using-a-base-controller-in-asp-net-mvc
I have the following declaration in my masterpage:
<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage<InsTech...
Hello,
I'm not sure where the problem is...
I have an ajax request that checks the tracking information for a package on a page with a list of packages:
$(".fedex_status").each(function() {
var item = this;
// some code to construct tracking_url
$.ajax({
type: "GET",
url: tracking_url,
async...
Is it possible to change the font settings for tooltip text in the mschart control?
I've tried setting the chart series font, but it doesn't affect the tooltip associated with the series data.
...
What is the proper (browser agnostic) way to disable page caching in ASP.NET MVC?
...
I am looking for the most standard way to archive modal dialogs in ASP.NET MVC. An example of what I am trying to do is when I select an item from my "list" page, I want the "details" page to be a popup over the list and NOT a new page. I'm not looking for a hack. I want it to be a solution that follows the ASP.NET MVC pattern. I wou...
Hi, just trying to set up my development environment for ASP.NET MVC, have started a blank ASP.NET MVC project, and have placed the following in my web.config: <trust level="Medium" originUrl=""/>
Running the project then results in the following exception:
Description: The application attempted to perform an operation not allowed ...
I'm interested in using Spark for an open source pet project of mine that runs with the asp.net mvc framework. I wonder if anyone has real experience with it and knows how it performs compared to the normal asp.net view engine?
I know that marketwatch.com runs asp.net mvc and Spark.
...
Hi!
I have a ASP.NET MVC application where I have a HTML.Listbox where the user can add items to it, in the webpage. It looks like this.
<p>
<label for="groups">Grupper:</label>
<%= Html.ListBox("RoleGroups", (Model != null ? new SelectList(Model.RoleGroups) : new SelectList(new List<BL.Portal.Domain.Model.RoleGroup>(){})))%>
<%...
I have a database with this two tables
ProductCategory
IDCat
Name
Description
ProductSubCategories
IDSub
Name
IDCat
This tables are related trought IDCat.
How can i do with LINQ to retrieve the list of Category and SubCategory grouped by Category ??
In my PartialView I would like create a menu with Category and SubCatego...
I have an ajax form in asp.net mvc which is as simple as this:
<div class="panel" id="blogPostPanel">
<img src="/images/ajax-loader.gif" alt="ajax-loader" />
</div% } %>
I want to invoke the form submit when document is loaded. This should supposedly, call the controller's action and return a result that should...