I'm trying out ASP.NET MVC, but, after reading a huge tutorial, I'm slightly confused. I understand how Controllers have Actions that URLs are routed to, but how do home pages work? Is the home page its own controller (e.g. "Home") that has no actions? This sounds correct, but how is it functionality implemented without Actions (no Actio...
I have an object which contains models for my ASP.NET MVC web app. The Model that is being passed into the view has sub models for "gadgets" on that particular view. Each of these sub models gets passed to a partial view (gadget).
The problem is when I have a null model in the view model. See example below.
View Model:
public class Fo...
I am attempting to create a strongly typed view with a "MVC View User Control" that is being rendered using Html.RenderPartial(). The top of my ascx file looks like this:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.Collections.IEnumerable<string>>" %>
There is nothing else on this page, currently.
When ...
I have the requirement to support themeing of my site's pages. The way I am doing this is by dynamically choosing a master page based on the current theme.
I have setup a directory structure like so
/shared/masterpages/theme1/Master1.master
/shared/masterpages/theme1/Master2.master
/shared/masterpages/theme1/Master3.master
/shared/ma...
Hello,
I have a via with some jQuery function to get value from HTML element (to access element available and element not yet available). On of these element is a dropdown, when I select a value an another vue is added in the bottom of the page in a div. When I try to access an element added by this view, I received "undefined". What ca...
With ASP.net MVC is it possible to POST a form to a controller action which includes parameters not in the form, but from the URL?
For example
The Action method in GroupController:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(int idOne, int idTwo, Model model)
{ ... }
The route:
"{controller}/{action}/{idOne...
I have a problem at my production web, that I am not able to solve.
I am not able to reproduce the problem in stage or development. It only appears when the website is under heavy load.
I think it is solvable if somebody who has a very good understanding of the internals of FormsAuthentication would have a look at it by logging into ou...
I have a ASP.NET MVC site which uses ASP.NET Formsauthentication I have the ticket set to expire after 20 minutes of inactivity. However it is expiring after 20 minutes no matter what.
I guess what I am asking is, is this the right functionality of it or do I have some issue and if so a solution to this would be appreciated.
...
Disclaimer: this is not a question about how to install asp.net or an application using it!
Hi!
I am pretty sure many of you have once installed some kind of forum, blog or CMS (mostly PHP powered applications). All of these contain a folder mostly named "install" where (after you copied the files to the webserver) point your browser t...
Hi All,
EDIT: upgraded this question to MVC 2.0
With asp.net MVC 2.0 is there an existing method of creating Validation Summary that makes sense for models containing collections? If not I can create my own validation summary
Example Model:
public class GroupDetailsViewModel
{
public string GroupName { get; set; }
public int Nu...
I am generating a .cxml file on the server and pushing it to the browser based on certain queries. If I just link to a .cxml, it does what I expected and opens it in the respective application.
How can I generate a file and push it to the browser just like if it was linked to a file without it asking me to download it?
The link looks s...
I'm using ASP.NET MVC 2 for the first time on a project at work and am feeling like a bit of a noob.
I have a page with a customer search control/partial view. The control is a textbox and a button. You enter a customer id into the textbox and hit search. The page then "refreshes" and shows the customer details on the same page. In othe...
hello friends..
i need to write a use cases to test the asp.net mvc applicatoin.. please can anyone help me out..
thanks
...
I am just getting started with NHaml and ran into a snag.
This is my application.haml file:
%html
%head
%title = Get Some Data
%link{ href="/media/css/styles.css", rel="Stylesheet", type="text/css" }
%body
%div.page
%h1 = Get Some Data
_
When I try to view in a browser it throw the following error:
NHa...
I am developing asp.net mvc web app with MongoDB as the data storage.
I want to know others opinion about what drivers to use.
Should I use C# drivers which is supported by community?
Or, should I go to use Javascript driver which is supported by Mongo. How stable is javascript driver?
Thanks in advanced..
...
Hi folks,
is it possible to add a dot format / .format to the end of any route in ASP.NET MVC .. with a default being html or something?
and of course the .format is an optional value.
sample routes:-
http://whatever/controller/action.format
http://whatever/controller/action
those goto the same action method.
cheers!
...
I have just added a Telerik menu to my MVC application. I also have many views that render Telerik grids on them.
Problem: My menu has one item with sub items. When I hover over that menu item, the dropdown slides beneath the Telerik Grid, which hides most of the sub items and makes it impossible to click them. Any idea how to make ...
I cannot get the following route to fire when a url is requested from a script tag. I have the following route:
// maps to "/cache/cachecontent/JavaScriptInclude/1/javascript"
routes.MapRoute(
null,
"cache/{action}/{key}/{version}/{type}",
new { controller = "Cache"...
I've just installed MVC2 and I've got a view that looks like this
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Home.Master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Home
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID...
In my web app, I would like to show an "Admin" menu link only to users who have been added to the database as an administrator.
What would be the best way to do this in ASP.NET MVC 2?
At the moment, I am doing it by checking whether the user exists in the Admin database table for every page. Obviously, there must be a better way to do ...