asp.net-mvc

ajax calendar hours and minutes

Hi. Is there an extension or some method in the ajax control toolkit associated with the ajax calendar which can create specific DateTime object even with specific selected hours and minutes? Or perhaps some other easily managable datepicker? ...

How can I get my webapp's base URL in ASP.NET MVC?

How can I quickly determine what the root URL is for my ASP.NET MVC application? I.e., if IIS is set to serve my application at http://example.com/foo/bar, then I'd like to be able to get that URL in a reliable way that doesn't involve getting the current URL from the request and chopping it up in some fragile way that breaks if I re-ro...

How to "invalidate" portions of ASP.NET MVC output cache?

Is there a way to programmatically invalidate portions of the ASP.NET MVC output cache? What I would like to be able to do is, if a user posts data that changes what would be returned from a cached action, be able to invalidate that cached data. Is this even possible? Thanks, Matthew ...

Multiple/addable drop down lists in asp.net mvc

Is it possible to have multiple drop down lists in asp.net mvc? What I'm trying to do is have a drop down list, say with many colours, Red, Green, Blue, Black etc. Then next to it a text box which the user can enter a number. However there should be then a small + little sign next to it so that another drop down list appears underneath...

MVC, action for controller

I'm building an MVC app for the first time. Currently, my app presents a small form that will let the user provide an input string (a url) and on submit, will use the user's input to create a new record within the db table, and output a clean url. I'd like to add a condition within my homecontroller file that will: 1) check if the "url"...

ActionResult return to page that called it

I have a ActionLink, that calls my public ActionResult, and I would like it to return back to the page that it was called from, but how? ...

Does ASP.NET MVC need to be installed on my production web server?

My IT folks don't like to install software on their precious servers unless they must. To that extent, does the server that serves my ASP.NET MVC application need to have the MVC 1.0 Framework on it in addition to .NET 3.5 sp 1 Framework? ...

How to force style overrides in CMS?

Preface/Environment: I'm using fckEditor, asp.net MVC, and jquery Our site has a set of sitewide styles. They include fonts, lists, and certain other basic functions. body p a ul ul li div.content etc.... The problem comes in with our CMS. We're using FCK editor, and saving the content changes to a database which are then served...

Is asp.net mvc still a separate download?

Hi, I have asp.net 3.5 sp1 installed, using vs.net 2008. Is asp.net mvc still a separate downlaod? ...

How to use jQuery UI Calendar/Date PIcker for week rather than day?

I've been using the jQuery UI Calendar / Date Picker with great success over the last couple months. I've been given a new requirement to allow for a week to be selected (Sun - Sat) rather than a single day. Has anyone accomplished this before? highlighting by week rather than day show beginning date and ending date rather than sing...

Returning a collection with Ajax Request

I have the following in my view: <ul id="statements"> <% foreach (var s in Model.Statements) { %> <%Html.RenderPartial("StatementControl", s); %> <% } %> </ul> Now I want to use Ajax to return a new Statements object when user clicks on one of several links: <ul id="statementChoices"> <li>group1<li> <li...

How to submit the value of the selected link when using Ajax Form?

The name of the selected link is the value that needs to be submitted to the controller from an Ajax form. ...

ASP.NET MVC Routing giving dir listing at root.

I've got the following routes: // Submission/* routes.MapRoute( "Submission", "Submission/{form}", new { controller = "Submission", action = "Handle", form = "" }); // /<some-page> routes.MapRoute( "Pages", "{page}", new { controller = "Main", action = "Page", page = "Index" }); The first routes requests exact...

How do I make a beta access page like the one on superuser.com?

I'm working with ASP.Net MVC and I would like to make a web site accesible via the internet, but only to a select few people right now. I want to do something basically exactly like the beta access page with password just like they did on stackoverflow, serverfault, and superuser. I don't just want to check and redirect in the home cont...

How is RedirectToRoute supposed to be used?

I have this in my Global.asax.cs: routes.MapRoute("BetaAccess", "beta-access", new { controller = "Beta", action = "Index" }); And this in my controller (index action on HomeController) and it definitely is getting hit: RedirectToRoute("BetaAccess"); But still no redirection happens... it just goes to the normal home page. Am I usi...

Redirecting in ASP.NET MVC with parameters

I have the following code but it doesn't seem to redirect to my action with the given parameter. I have redirected something similar but the parameters were query string parameters. I'm wondering if it is done another way for parameters since the following doesn't work or what I might be doing wrong in my call to the action? public Ac...

How do I Keep a user logged in for 2 weeks?

HI I am using asp.net mvc with asp.net membership. I want to have a checkbox that if clicked keeps the users signed in for 2 weeks(unless they clear their cookies). So I know their is FormsAuthentication.SetAuthCookie(userName, createPersistentCookie) but I don't know how to set it up for 2week retention. I rewrote most of the memb...

Integrate New ASP.NET MVC App With Existing Roles

We've got an existing ASP.NET web application that already uses a home-grown role based authentication system. Each user has a role and that role is actually a fully realized class in itself. It still boils down to a pretty standard set of roles (user, administrator, owner, etc). Now we're starting up a new ASP.NET MVC project that us...

ASP.NET MVC: ModelState vs. ModelStateDictionary

Hello, I have a service which has a method that's called when a certain controller method is triggered. My service returns a custom result object PlacementResult in which I want to communicate errors that may have happened (validation) back to the controller method. Should PlacementResult have a ModelState or a ModelStateDictionary to ...

MVC Routing question

I have the following route: routes.MapRoute("Archive", "archive/{year}", new { controller = "Archive", action = "Results" } ); I have the route working correctly, but I would like my url to show as follows: http://mysite.com/archive/2008 when I click on the search button instead of just: http://mysite.com/a...