asp.net-mvc

Is Microsoft.Web.Mvc.Internal.ExpressionHelper.GetRouteValuesFromExpression(expr) exposed now?

I want to use the method: Microsoft.Web.Mvc.Internal.ExpressionHelper.GetRouteValuesFromExpression(expr) but I don't want to use Microsoft.Web.Mvc, is this call supported in asp.net mvc now? ...

Entity Framework not populating context

I'm just starting out with some entity framework exploration, I figured it was time to see what everybody was complaining about. I am running into an issue where the entities don't seem to be returning any of the object context. I generated the model from a database with three tables which link to one another. Courses Instructors Ca...

Selling upper management on converting to ASP.NET from Classic ASP

A client of mine has an application written in Classic ASP and COM+. The managers are interested in migrating it to ASP.NET MVC but they have to convince the CIO that it is a good move. The old app still works OK, other than the fact that no one at the company can maintain it. How can we sell upper management on converting to ASP.net fro...

Membership provider stopped working on using Membership Provider in ASP.Net MVC

I have a production ASP.Net MVC application that has been using the membership service. It has worked fine, up until today. Nothing has changed on the server, but I now have this error: System.Configuration.Provider.ProviderException: The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema ver...

Can I move my asp.net mvc app into microsoft cloud?

without making a lot of changes. Did anyone try it? Are there any known patterns to work with for cloud computing using Azure platform. ...

long delay between serverside JSON and jqGrid loadComplete on asp.net mvc site

i have an asp.net mvc site where i load a jqgrid with json data Here is my controller action code: public ActionResult GridData(GridData args) { IEnumerable<Application> applications = EntityModel.GetAll().ToList(); applications = FilterEntities(applications); if (args.sidx.IsNullOrEmpty() || args.sidx =...

How to change width of html.DropDownListFor()

I have small design question about html.DropDownListFor() How can i change width of html.DropDownListFor() ?? For example by css. Thanks for answers ...

ASP.NET how to implement IServiceLayer

I'm trying to follow the tutorial found here to implement a service layer in my MVC application. What I can't figure out is how to wire it all up. here's what I have so far. IUserRepository.vb Namespace Data Public Interface IUserRepository Sub AddUser(ByVal openid As String) Sub UpdateUser(ByVal id As Integer, By...

Design decisions

I have been asked to choose between Web Forms and MVC for a minor internal company project. I do not know MVC. How much of MVC do i have to know to be able to make a decision? Note: 1. I have read up on MVC to an extent that i know the high level design choices that I will have to make, however as a developer, I do not feel comfortable ...

OpenID on Google not returning anything

Hi there, For some reason, the following code does not return anything: string alias = response.FriendlyIdentifierForDisplay; var sreg = response.GetExtension<ClaimsResponse>(); if (sreg != null && sreg.MailAddress != null) { alias = sreg.MailAddres...

ASP.NET Exception Handling in background threads

When I do ThreadPool.QueueUserWorkItem, I don't want unhandled exceptions to kill my entire process. So I do something like: ThreadPool.QueueUserWorkItem(delegate() { try { FunctionIActuallyWantToCall(); } catch { HandleException(); } }); Is this the recommended pattern? It seems like there should be a simpler way to do this. ...

Initiate User Scope Class at Session Start

I want to initiate a class for each user at the start of the user's session so that a single class can be used throughout the user's session. I checked out this post but I'm not sure where I should be placing this Sessionhandler class. Inside global.asax? How do I go about accomplishing this? ...

Constants and aspx

I have constants in my cs file Constants.cs. In the asp.net mvc controllers I use the constants like this ViewData[Constants.Whatever] = ...; How can I use the constants in my aspx file? When I try to use it I get an error saying: CS0103: The name 'Constants' does not exist in the current context ...

Converting DTOs to View Models

Does anyone know of a good (read: quick to code) method for converting DTOs to View Models or mapping DTO members to View Model members? Lately I've been finding myself writing many conversion and helper methods but this is a very arduous and tedious task. Moreover, it will often needs to be done twice (DTO -> View Model, View Model -> D...

asp.net mvc select change redirect to Action

I am correctly passing the action name from the Controller to the paging class and then using select list i want to redirect to that action. at this moment it is appending to the current url.i want the correct way of redirecting to the controller action manageUser using select list below What should we have here in Model.COntroller . ...

Access a PartialView's Model in a View which implements that PartialView

How can you access a PartialView's model, in a View which implements that PartialView? I'm thinking something along the lines of: Page.FindControl("PartialView-name").Model. ...

MVC2 or WCF for an XML/JSON REST API?

I spent a long time learning how to customise WCF from the point of view of adding authentication etc over a RESTful service; I built some custom service hosts, then added the ability to use an IOC container to actually create the service instance etc etc. We have iPhone/iPad apps plus some other gadgety-type things (technical term!) th...

ASP.Net MVC Outbound Route Matching Problem When Using ActionLink

Hi there, Hoping for some help after reading into MVC routing and not coming up with the answer myself. I have the following routes registered: public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( null, "YourFeedback/...

model binding of non-sequential arrays

I am having a table in which i`m dynamically creating and deleting rows. How can I change the code such that the rows be added and deleted and the model info property filled accordingly. Bearing in mind that the rows can be dynamically created and deleted, I may have Info[0], Inf0[3], info[4]... My objective is to be able to bind the ...

html.checkbox - explicit value to hidden field value

Hi I am creating list of checkboxes in partial view by follwoing http://blog.stevensanderson.com/2010/01/28/editing-a-variable-length-list-aspnet-mvc-2-style/ code and Rendered HTML for checkboxes is as follows <%=Html.CheckBox("EmployeeID", new { value = user.EmployeeID, @class = "ccboxes", title = user.Designation + "(" + user.Empl...