asp.net-mvc

Client-side partial page rendering and search engines

Hi I'm beginning to write what may grow to be a large commercial website. The business has several facets, so I'm considering a 'widget' based UI not dissimilar to the BBC homepage (http://www.bbc.co.uk). I'm writing a content management system that would allow an administrator to compose pages using a selection of pre-defined widgets...

Restrict access to web site based on Referrer, cookies or something else

We have a scenario whereby we are hosting an ASP.NET MVC web site on behalf of someone else. The customer in this case wants us to restrict access to the web site, to those users who have logged in to their main portal. They should then only be able to get to our web site via a link from that portal. At this point I'm not yet sure what...

how to secure feed in asp.net mvc??

how to secure rss feed in asp.net mvc?? ...

ASP.NET MVC Route IDs with a period

If I have a route with the following {controller}/{action}/{id} and I look at the following URL c1/a1/abc. it doesn't work. This only happens when the period is at the end of the URL. Any way to get ASP.NET MVC to recognize that as part of the ID? ...

asp.net mvc - how to pass more than 1 default paramters when mapping routes

I am trying to pass more that 1 default parameters when mapping a route i.e routes.MapRoute( null, "items", new { controller = "Items", action = "Index", new { page = 1, pageSize=10 } } //prob here ); Works fine with 1 parameter like: routes.MapRoute( null, "item...

ModelBinder with multiple selection and complex objects

I'm trying to bind the selections in a multiple selection SELECT, to an IList input in the controller. <select name="users" multiple="multiple"> <option>John</option> <option>Mary</option> </select> class User { public string Name { get; set; } } //Action void Update(IList<User> users) { } I've tried renaming the select as "...

ASP.NET MVC - Website paths

I am using a 3rd party component which creates settings files based on hard-coded file paths i.e. they are compiled into the DLL e.g. %APPDATA%\Vendor\Settings.ini I have created a few console/service applications that use this and work very well. However, I am now trying to use a similar approach via my ASP.NET MVC web application and...

C# Silverlight: How to get ID from within Silverlight using asp.net MVC

Withing a Silverlight Application, how does one get the ID from the URL when using MVC given the URL in the standard MVC Format {controller}/{action}/{id} Is there anything MVC specific or does one need to parse this URL 'manually'? ...

Creating a hybrid-model (with bits of other models) in ASP.NET MVC?

I've created an Audit table for an ASP.NET MVC application to track key changes and actions. I want to present the contents of this table to authorized users in an easily readable format on the view. The Audit table is (simplified) like so: ID (int) | StaffID (int) | Action (string) | Timestamp (datetime) ------------------------------...

How do i implement a login view as a jQueryUI dialog box in ASP.Net MVC

I've seen a few example of similar things and i've also looked at the KiGG application which also uses a dialog box to display the login box. I'm pretty new to MVC but making some good progress and i'm looking to add a bit of candy for a demo i need to perform next week. Does anyone have an simple example or could describe the steps i n...

Html.RenderAction causes "No route in the route table matches the supplied values"

I'm trying to use Html.RenderAction in ASP.NET MVC 2 RC2 in this way: In Menu Controler: [ChildActionOnly] public ActionResult ContentPageMenus() { var menus = _contentPageMenuRepository.GetAll().WithCulture(CurrentCulture); return PartialView(menus); } And in my Index view (for Index action of Home controller): <% Html.R...

Subsonic 3.0 MVC and paragraph control.

I have a subsonic 3.0 MVC site. Is it CMS based? if yes how can i use subsonic's paragraph control. If its not CMS based then from where i can get it? the subsonic 3.0 on http://subsonicproject.com/ does not contains the CMS? ...

MVC Partials/Controls Requiring Data

What is the recommended "cleanest" way to manage a partial that appears on many views and also requires a viewmodel (assume it needs to get some data from a DB). ...

Dynamically Update Stylesheet Reference

I need to dynamically alter my stylesheet link in my masterpage. I have the code below but the css isn't displaing correctly and the outputed HTML looks like below.. Outputed HTML <link href="../Content/%3C%25=c.Area_Name%20%25%3E.css" rel="stylesheet" type="text/css" /> Stylesheet reference <% foreach (var c in (IEnumerable<Catego...

how to use paragraph control in subsonic 3.0 MVC?

How can i use paragraph control to edit the paragraphs in subsonic 3.0 MVC??? ...

Modifying type-specific properties in implementation of interface

I know this is a silly question, in that the answer is likely an "oh right, of course!" one. Here is what I have: public interface IEvent { int Id string Title } public class MeetingEvent : IEvent { int Id string Title //Meeting Properties string Room; User Organizer; } public class BirthdayEvent : IEvent { int Id ...

How to visually separate security-trimmed action links in ASP.NET MVC

I am experimenting with security-trimmed action links in ASP.NET MVC, and am considering using the SecurityTrimmedActionLink helper method described here. What I would like to do is put a vertical bar between each link like this: link1 | link2 | link3 But I don't want two vertical bars to appear between links if a link has been trimm...

Do standard webservices (asmx) work with MVC?

I have just tried adding a WebService (asmx based) from a WebForms project to a new MVC project. I cant seem to get to the asmx webservice in IE? In MVC should this work the same, I have the service in a Services folder, should this be in a View or should this asmx work outside the 'MVC' routing? Update: I set up the WebService initia...

Can I use my beloved Calendar Extender in MVC?

I love the calendar extender, but I am unable to use it in my MVC app. How do I connect the calendar extender to a textbox in MVC... or add the extender at all for that matter? Old Way... <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> ... <asp:TextBox ID="txtDate1" runat="server" Validatio...

Returning Entity Data Model Entities as JSON data

I noticed people wrote about this circular reference problem quite a bit before but no solution was ever posted. I'm talking about this error: "A circular reference was detected while serializing an object of type 'DocInvoice.Models.Clients'." Has anyone tried serializing it to JSON with Json.NET library? If I have Linq to entities q...