asp.net-mvc

Asp.Net MVC - New Project How to Begin?

I’m new to asp.net and the mvc framework and I’m trying to learn by using the asp.net learn tutorials for Building a Contact Management Application in vb (http://www.asp.net/learn/mvc/tutorial-29-vb.aspx). The question I have is that I would like to begin a new project to start using mvc, but how do I start…. The tutorials start by put...

Running java applet in ASP.NET MVC application

Hi Guys, I have a applet that runs with no issue in asp.net web application ... but when comes to ASP.MVC application ..here applet is not working throwing class not founnd exception please let me know if anyone could able to run applet in MVC application .. below is the code from view <object classid="clsid:8AD9C840-044E-11D1-B3E...

ASP.NET MVC - Localization route

Hi, i'd like to create localized URL's for my site. They should obviously point to the same controller actions, but I want the first routevalues to -always- be the location/language specification. Is this possible? http://www.website.com/en/us/controller/action http://www.website.com/en/gb/controller/action I understand it ca...

Data Entities Connection String Problem

I must have changed something somewhere, but damned if I can figure out what it is. I have a DAL that handles all my data access (as is a DAL's wont) to my SQL Server DB. This includes the Entity Model, the repository classes and the connection string in the App.Config file. Somewhere along the piece, I must have changed something and...

Filter visits to a site generated by "Top Sites" feature of some browsers

In this answer to a Meta question, Jeff states that he has fixed the problem where visits created by the "Top Sites" feature in Safari were counted for the Fanatic and Enthusiast badges. My question is: how can this be done? How I programatically tell a "top sites" visit and a regular visit apart? I'm looking for a general solution, a...

How to make only single database query when accessing Linq to SQL IEnumerable object?

My application constructs a Linq To Sql query and then populates a model which is then passed to the view. The view then accesses the IEnumerable object (from the Linq to Sql query) to display the user interface. The problem I am having is that each time the View accesses the IEnumerable object from the model, the linq to sql database ...

Iterating over an unknown IQueryable's properties?

Forgive me if this has been asked before; I couldn't find anything close after a few searches: I'm trying to write an ActionFilter in MVC that will "intercept" an IQueryable and nullify all the parent-child relationships at runtime. I'm doing this because Linq does not serialize objects properly if they have parent-child relationships (...

Using partial views to simplify a complex view - a good approach?

Is it correct to use partial views for the SOLE purpose of breaking down a more complicated view into separate chunks and therefore making it more readable? It probably seems a silly question but the reason I ask is that everything I've read about using partial views involves a piece of the UI being re-used in multiple places. In my ca...

ASP.NET MVC Routing with Default Controller

For a scenario, I have a ASP.NET MVC application with pages that looks like follow: http://example.com/Customer/List http://example.com/Customer/List/Page/2 http://example.com/Customer/List http://example.com/Customer/View/8372 http://example.com/Customer/Search/foo/Page/5 These pages are achieved with following routes in Global.asax....

Asp .Net MVC Caching with Velocity

Is it possible to integrate Asp .Net MVC with some caching framework like Velocity? ...

How to get selected rows using checkbox in asp.net MVC

Hi i've a problem related to html.checkbox in my MVC application. My scenario is: I've a list(index view) page where i bind data from the database with a checkbox to select/deselect the item. when i click save button i want to get selected rows to save those items back to db. i used 1. <input type="checkbox" id="chk2" value="<%= i...

MVC which submit button has been pressed

I have two buttons on my MVC form: <input name="submit" type="submit" id="submit" value="Save" /> <input name="process" type="submit" id="process" value="Process" /> From my Controller action how do I know which one have been pressed? ...

Asp.Net MVC - Mapping Data Objects to View Model

Our current MVC project is set up to have ViewModels that encapsulate the data from the repository and pass it to the view. When doing the mapping (In the controller) from Data Object to View model what is the best way to achieve this? I've seen AutoMapper (http://www.codeplex.com/AutoMapper), but wondered if there was an out of the ...

Sending URLs/paths to ASP.NET MVC controller actions

Based on various sources it is apparently impossible to send a path like this "/Content/Scripts/jquery.js" as a parameter to MVC action, because forward slashes are used as parameter delimiters "/" and ASP.NET MVC returns 400 Error. The only working solution I found so far was to Base64 encode such string, send this as a parameter value...

FormCollection for a checkbox

My FormCollection is returning back a Checkbox, but I am after the value collection["SelectedCheckbox"] this returns "true,false" but I want the results, which should be either true or false ...

Want to use index.html from mvc

When I loaded up my new website I have some of it using MVC and the other half using static pages. The first page should be index.html However when I go to http://domain, it goes directly in to the MVC controller. It does not go to index.html, even though I have IIS pointing to this page, it might be due to the fact that I am using wi...

Asp.net MVC Dynamic Menu System

In our current Asp.net MVC application we have 2 menu systems one accross the top and one on the left hand side. Now we have a partial view that renders the menu, however is the only way for this too work to return the menu items back with every single ViewModel? We are trying not to use the ViewData dictionary. I think the answer to t...

ASP.NET MVC Busy Box Implementation

I'm wondering if anyone has created a generic "busy box" type control for ASP.NET MVC. Basically something that popups (disables the screen) while the page loads (or redirects). ...

ASP.NET MVC and Service Oriented Architecture

Hello, I would like to know how do i incorporate a feature like wcf within and MVC application. My current idea of the architecture is as follows: EntityFramework -> ASP.NET MVC (Views) EntityFramework -> ASP.NET MVC with WCF endpoints -> mobile Apps. EntityFramework -> ASP.NET MVC -> Silverlight (using .NET RIA Service...

Run ASP.NET MVC in Internet Hosting Providers

My question is very simple. Can I run an ASP.NET MVC application on shared servers that has installed ASP.NET 3.5 but not MVC? If this is possible could you tell me how? ...