MVC View Details and Edit
I have a view which displays data from the database like a blog post and at the bottom I would like the ability for a user to comment, how would one achieve this? ...
I have a view which displays data from the database like a blog post and at the bottom I would like the ability for a user to comment, how would one achieve this? ...
Say I have an ASP.Net MVC webiste hosted at www.somedomain.com. Now I am interested in providing a mobile version at m.somedomain.com. Do I need to completely rewrite the site or can MVC detect the browser type and route through to mobile optimised pages automatically? ...
I am an ASP.Net MVC noob. I cannot get checkboxes to render correctly i.e. checked/unchecked. This is a snippet of my view: <input id="<%= item.ReportName + "|" + "email" %>" type="checkbox" checked="<% if (item.Email == true) { %>true<% } else { %>false<% } %>" onclick="ajaxfunction(this)" /> This is the source view from IE: ...
Hi there, I am playing with a proof-of-concept app in ASP.NET MVC and I have a query about routes when using jQuery. One of my functions requires me to call ~/jqdata/myFunction/ and this is all fine using $.get("/jqdata/myFunction/" + $(this).attr("name"), function(data) { alert (data); } However, I am not going to be able to cont...
In Asp.NET MVC, how do you make your controller return a view with a query string? thanks ...
Let's say you have an object called Person that looks like this: class Person { public int ID { get; set; } public string Name { get; set; } public int NumberOfCatsNamedEnder { get; set; } } I have a simple HTML form that exposes the properties that gets posted to an ASP.NET MVC action inside of my PersonController class. The i...
I have an action method that depending on some conditions needs to return a partial view via ajax, or redirect to another Controller/Action. The correct view is returned but it is placing it in the Ajax forms UpdateTargetId rather than redirecting to a completely new page. Anyone have any idea how I can accomplish this? ...
I really like the MVC "way" and have actually enjoyed learning ASP.NET MVC (I never liked ASP.NET Webforms but I didn't know why until now). The problem is I'm about to inherit a bunch of Webforms code and wondered if I'll be able to add new things to the codebase with MVC instead off using Webforms. I suppose it depends a lot on how a...
Hello, I have a very simple ASP.Net MVC Application that I have produced from an online tutorial. I've followed it exactly, step by step and have tried multiple times but keep getting the same error when I execute the code. The program just displays an index page which lists a series of data from an sql server database using linq to sql...
I am adding MVC to a project that has MANY legacy webform pages. This works fine. However, I currently have a separate masterpage for MVC and for the webforms. The two master pages produce essentially identical output. I'd really like to kill the webforms one and just use the MVC master page with all my pages and stay DRY. Not bei...
I have an interface that contains a single method called ListAll() using System.Collections.Generic; namespace MvcApplication1.Models { public interface IMovieRepository { IList<Movie> ListAll(); } } I have a class that implements that interface: namespace MvcApplication1.Models { public class MovieRepository : IMovieRepository { pri...
I'm banging my head against the desk trying to get even a basic slider working. I think it must have something to do with the style, but I can't get the dang thing to even display. I have a very basic ASP.NET MVC application and in a view, i have: <% using (Html.BeginForm()) { %> <fieldset> ... <div id='mySlider'></div> ... </field...
Where can I get a complete reference about Web Deployment Projects 2008? I have searched for it, but it appears that there are only blogs posts or forums questions about WDP specific characteristics. ...
Hi I am devloping the a asp.net site which will have lots of user online at a time. I am writing very efficient stored procedure for it. Which ORM tool should I use? Ado.net entity framework or linq2sql? Performance is needed as our requirement is to load every page in 4 seconds. ...
In ASP.NET MVC I would like to do something like: Let a base controller check for the type of the ActionResult. If the ActionResult is a ViewResult, load some shared data for all views. If the shared data fulfills some specific criteria, redirect to a login page. How would you implement that? I thought about the following, but it ...
Anyone know how to set the default sort order for the mvccontrib grid? ...
I am creating a Web application using ASP.NET MVC, and I'm trying to use domain-driven design. I have an architecture question. I have a WebControl table to store keys and values for lists so they can be editable. I've incorporated this into my business model, but it is resulting in a lot of redundant code and I'm not sure it belongs t...
I've been building a ASP.NET MVC application and using forms authentication. In my controller action I have: [Authorize(Users = "me,joe")] that has been working great. Last night when I published the newest changes and attempt to view my website it started popping up a Windows Authentication dialog box. I've looked at all my code a...
I am trying to retrieve an image from SQL Server (yes, data type is image) and display it in a view in my ASP.NET MVC app. Does anyone know how this can be done? A working example would be appreciated. ...
First of all, I'm really new to the MVC Asp.Net ideology. I would like to know how can I create two objects (model) into one view ? because if I look at the view header it's inherit from one model : \<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> So, if, for example,...