asp.net-mvc

MVCContrib - Using Html.StyleSheet() Helper Renders Incorrect Path when used with T4MVC

I am using the latest version of MVCContrib and attempting to include a stylesheet via the following helper method: <%=Html.Stylesheet(Links.Content.Site_css)%> The path rendered is incorrectly calculated as: <link type="text/css" rel="stylesheet" href="/content/css/Content/Site.css" /> The actual path should be: /Content/Site.css ...

Call an action in a controller and continue with the view from the same point with the same info

Hello, What I am looking to do is have my site.master call a specific controller action, and then continue to process the current request without any view or information change. I want to do this in the site.master because I want this action to run on every page that is loaded, and since all pages use my site.master (as I have not creat...

azure developement fabric dll hell

Hello I am trying to package and start up azure developement fabric on a windows 2008 server, I am so close yet still far. The steps I take are 1) run cspack.exe command /copyOnly to generate the .csx folder 2) run csrun.exe commmand /LaunchBrowser to start up the developement fabric and startup the browser the error is as follows ...

ELMAH in asp.net mvc2

Can any body give me code to impement ELMAH error handling for my asp.net mvc application.. I need to know step by step process to implemnt? thanks ...

Should I use the built-in membership provider for an ASP .NET MVC application?

I've been using a custom membership provider for authentication in all my web form applications till now. I'm about to start developing my first website using MVC. I'm wondering if I should I use the built-in membership provider that ships with ASP .NET MVC, or if I should create my own. My site needs to integrate with openid, faceboo...

can anybody give me an idea? about this exception handling

http://geekswithblogs.net/SanjayU/archive/2009/11/06/error-handling-in-asp.net-mvc-1-1-of-a-3.aspx in this URL.. Please first two steps can anybody explain me? The System.Web.Mvc.dll comes with the HandleErrorAttribute class, which contains..wait for it…the HandleError attribute. This information won’t be important until later in t...

Cannot find ContentPlaceHolder 'TitleContent' in the master page 'X/Site.Master' happening on one server but not another

I'm getting this annoying error in one environment but not another and I can't explain it. I don't have a TitleContent in the master page or in the content page. So how can this be occurring and more importantly, how can I stop it? ...

Is it better practice to use a few tag builders or a StringBuilder to generate an Object tag? ASP.NET MVC

Hello SO: I wrote an HTML helper to generate a YouTube embed link. It has 3 parameters, YouTubeID, Width, and Height. I originally wrote it with a StringBuilder, but then I decided to try to use the TagBuilder (well, a few of them). Here are the two different returns: //Tag Builder public static string YouTube(this HtmlHelper helper, ...

ASP.NET MVC 2.0 Simple Routing Question

Im in the process of moving our website from a crappy CMS over to a nice custom coded MVC website. Everything has gone smoothly so far but I'm having some issues with routing. Our company sends out a lot of marketing emails and letters. In these we have the user go to Landing Pages so we can track how campaigns are doing, as well as o...

MVC2.NET pass object from viewmodel to view and acces it.

Hi, When working with Viewmodels from linq to sql I have an architectural problem. When you have an object from your db (let's say "person"), and you load it in your viewmodel. After this in your view, when you try to acces referenced classes (let's say a person has children object which is a different table in db, and a different data...

Opinion: best way to retrieve/list data using .net mvc

Hi all, I'm new with the MVC framework and I was wondering what you think is the ideal way to retrieve data and list it on a page. Specifically, I'm referring to data used in report type pages, not lists of movies, books, or other clear 'objects'. Most online samples seem to suggest using ADO.net Entity Data Models & LINQ which are auto...

Binding pivot query to view in ASP.Net MVC

I'm sticking on how to best present some data that's being dynamically generated from two different tables. Given my query: var assets = assetRepo.Find(x => x.LoginId == User.Identity.Name); var accounts = repository.Find(x => x.AccStatus == "A" && x.LoginId == User.Identity.Name); var query = from asst in assets ...

How to redirect the Error page in asp.net mvc

Hello friends I have this code in my web config file.. I am new to asp.net mvc. <customErrors mode="On" defaultRedirect="~/Shared/Error"> <error statusCode="403" redirect="~/Shared/Error" /> <error statusCode="404" redirect="~/Shared/Error" /> </customErrors> and I have Error.aspx page under Shared Folder in my applica...

Asp.net MVC custom routing

I need to create a custom routing for this url: /par1/par2/par3/par99/11 The url must redirect to home/index/11 11 is the Id,i need only this parameter, the other parameter (par1/par2/...) are only for SEO purpose and could be any word. par1,par2,etc.. are created dinamically , so the Url could be: /par1/par2/11 or /par1/par2/par3/111...

[Flags] Enum with mvc rendering in checkbox on my view, reaction of my controller ?

If i got a list of checkbox in a View, and this list came from Enum (flags). If my checkbox as all the same name, did my controller will update automaticly my Enum (flags) values in my ViewModel with multiple selection ? Suppose i get in my View <% foreach (var t in Enum.GetValues(typeof(FoodType))) { Respons...

Calling cached data (in service layer) from an ASP.NET MVC View - what other alternative do we have?

We are adding tooltips to our ASP.NET MVC product, and we are getting the text from our database (technically, from a cached copy of the data). To do so, we created an Html Helper method: <%=Html.Tooltip(Model.GetTooltipText(Tooltips.ClientPage.StartDateId))%> The GetTooltipText method is in our BaseViewModel, and simply uses the pas...

Run ASP.NET MVC Application on Hosting

Hello All Is it necessary that we need to install asp.net mvc on hosting server to run application develop in asp.net mvc? I had developed a application and i am uploading on ixwebhosting hosting. my application is not working. ...

Issue with HTML5 audio control in Visual Studio 2010 and ASP.NET MVC

I am trying to add HTML5 audio control to my page. Here's the code: <audio src="../../Content/BattleNet_MusicLoop.ogg" controls="controls" autoplay="autoplay" loop="loop"> Your browser does not support the new HTML5 audio element. </audio> When I click debug, I can see the audio player for about a second and then it turns dark gret w...

"Type arguments cannot be inferred" error when using Html.TextboxFor with a ViewModel in an ASP.NET MVC 2 View

I'm writing an ASP.NET MVC 2 site where I have defined a custom ViewModel that I'm trying to use in a View. Unfortunately, I'm running into an error when using the ViewModel through a strongly-typed lambda expression. My Code Here's my ViewModel: [CompareProperties(ComparisonProperty1="EmailAddress", ComparisonProperty2="Confirm...

Why would Application_Init fire twice when starting debugging in VS2008/Casini?

Why would Application_Init fire twice when starting debugging in VS2008/Casini? Yeah, It's happening in global.asax. Seems fairly random though, only happens once in a while. ...