asp.net-mvc

ASP.NET MVC Beta 1 - Does It Support Strongly Typed View Data?

In previous releases there were 3 ways to pass data from controller to view AFAIK (shown below). I want to use method (2) with MVC Beta 1, but I can't find the renderView method. So what's the new syntax (if it's still possible)? Thanks in advance. Ben. Syntax #1: Old-school dictionary ViewData["Name"] = "Moo-moo"; ViewData["Age"] =...

ASP.Net MVC Ajax form with jQuery validation

I have an MVC view with a form built with the Ajax.BeginForm() helper method, and I'm trying to validate user input with the jQuery Validation plugin. I get the plugin to highlight the inputs with invalid input data, but despite the invalid input the form is posted to the server. How do I stop this, and make sure that the data is only p...

Make ajax get redirect main page to login when auth times out

I'm using ASP.Net MVC beta 1 and I'm using the asp.net membership provider with the standard authentication controller to restrict access to my site. I'm using ajax functionality to provide e.g. editing of values by loading partial views into a div with either jQuery $.get/$.ajax or with the Ajax.Actionlink MVC helper. This all works fi...

What are some examples of good open source ASP.NET MVC applications?

I've been browsing CodePlex, but I was wondering if there were any ASP.NET MVC applications that really stand out among the rest. ...

Where are the graphical page components for an ASP.NET MVC application?

This sounds really stupid, but I was told that you could drag-and-drop visual components (including JavaScript or AJAX components?) onto a web page view in ASP.NET MVC and then "customize" the components by editing code behind them once they were in place. Either I misunderstood what I was told or I'm blind and don't see how to do this, ...

ASP.NET MVC fails at install

Hi, I need some help on asp.net mvc install. I got the below two errors when I try to install ASP.NET MVC Beta: Faulting application devenv.exe, version 9.0.21022.8, time stamp 0x47317b3d, faulting module unknown, version 0.0.0.0, time stamp 0x00000000, exception code 0xc0000005, fault offset 0x006c0061, process id 0x11d8, application ...

How to Include Multiple Javascript Files in .NET (Like they do in rails)

I'm jealous of the rails guys. They can do this: <%= javascript_include_tag "all_min" %> ... and I'm stuck doing this: <script src="/public/javascript/jquery/jquery.js" type="text/javascript"></script> <script src="/public/javascript/jquery/jquery.tablesorter.js" type="text/javascript"></script> <script src="/public/javascript/jquery...

How do I set a "Default Action" for my Controller that will be called when no other action matches?

Say I have the following route: routes.MapRoute("Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" }); Lets also say that my controller has the following methods: Index(Int32 id) and Edit(Int32 id). So /MyController/Index/1 is a valid URL for that route. So is /MyController/Edit/1 How...

How do I display HTML stored in a database from an ASP.NET MVC view?

I have HTML code emitted by FCKEditor stored in a database and would like to display (well render) it onto a view. So, for instance, something stored as: &lt;&gt;pre&lt;&gt;This is some sample test&lt;&gt;pre&lt;/&gt Will be displayed to the user as: This is some sample text (With the appropriate style for preformatted-text) The v...

Has anyone heard of how .NET 4.0 may change/affect Asp.net MVC?

We should have a full release of asp.net MVC well before .NET 4.0 and VS 10 come out, right? I'm really hoping MS can keep MVC as dynamic as other more open frameworks are. ...

ASP.NET MVC alternatives?

So, I've spent enough time using ASP.NET webforms to know that I'd almost rather go back to doing classic ASP than use them. But I'm hesitant to move to ASP.NET MVC until it becomes more mature. Are there any open source alternatives? The main thing I'm looking for is something that's easy to learn and to get a prototype up and runnin...

Populating a form dynamically based on user input in ASP.Net MVC

My question is similar to Engram's here, but my question goes a bit further. The way i intend it to work is I have a textbox asking how many entries a user is going to make. After they input the number, I need to create that many more textboxes to allow for entries (and then repeat the same process with those textboxes, but baby steps ...

Is there any point to writing your own validation framework for MVC beta or do you expect one will be released soon?

Hi, There have been plenty of questions on MVC validation but so far the answer has been pretty much inconclusive. For my needs in particular, I would like something that generates client validation and server validation from the same description and should allow both model based attributes as well as code based declarations for those ...

Using Web Browser as a Thin Client to Access certain applications on Server

I have an ASP.NET MVC application, when a user clicks on the submit button of that application, the server should capture all the information in the form, and call a local windows application ( located at "c:\Program Files..." and do some processing before passing back the data to the users. Now, is this possible? Is there any security ...

Using the greedy route parameter in the middle of a route definition

Hi, I'm trying to create routes which follow the structure of a tree navigation system, i.e I want to include the entire path in the tree in my route. So if I had a tree which looked like this Computers Software Development Graphics Hardware CPU Graphics cards Then I would like to be able to have routes that looks like this ...

XSL(like) declarative language as MVC view over strongtyped model?

As a huge XSL fan, I am very happy to use xsl as the view in our proprietary MVC framework on ASP.NET. Objects in the model are serialized under the hood using .NET's xml serializer, and we use quite atomic xsl templates to declare how each object or property should transform. For example: <xsl:template match="/Article"> <html> ...

Deploy ASP.NET MVC on IIS 5.1 (Windows XP)

OK, deploying ASP.NET MVC seems to be painful. I want to deploy my ASP.NET MVC application on Windows XP (IIS 5.1), but can't seem to find how to do it. When I type the application name into the web browser address bar I get a "website not available" message. There are workarounds for IIS 6.0, but what about IIS 5.1? ...

Break points aspx pages

How do you set a break points in server tags in .aspx pages. e.g. <% dim breakhere =new object() %> The web application is running in debug mode with the <compilation debug="true" ... in the web.config. But the page says: The break point will not currently be hit. No symbols have been loaded for this document. Is there any...

ASP.NET MVC Storefront VB Port? LazyList in particular

Hi, I am using Rob Connery's excellent MVC Storefront as a loose basis for my new MVC Web App but I'm having trouble porting the LazyList code to VB.NET (don't ask). It seems that VB doesn't allow the GetEnumerator function to be specified twice with only differing return types. Does anyone know how I might get around this? Thanks Pr...

Set selected value in SelectList after instantiation

Am I right to think that there is no way to set the selected value in the C# class SelectList after it is created? Isn't that a bit silly? ...