asp.net-mvc

Converting button events etc to ASP.NET MVC

Given an asp.net webform page which does something like asp.net <asp:textbox id="txtA" runat="server" /> <asp:textbox id="txtB" runat="server" /> <asp:button id="btnAddTogether" runat="server" text="Go" onclick="btn_Click"/> <asp:textbox id="txtResult" runat="server" /> code behind protected void btn_Click(...) { txtResult....

who's faster mvc2's Templated Helpers or mvccontrib's Input Builders

anybody knows which ones works faster ? ...

ASP.Net MVC2 Securing the site via tokens and whatnot

I am trying to use MVC 2 as a middle layer for my iPhone app. The basic principal here is the MVC site will expose APIs that will allow users to POST data from iPhone and GET data from sql database running behind MVC app. The MVC 2 project will facilitate to and fro logic. I have few questions regarding that... 1. What is the best way o...

not strongly typed view problem

Controller action: public ActionResult Index() { probaEntities proba = new probaEntities(); probaEntities proba1 = new probaEntities(); probaEntities proba2 = new probaEntities(); var query = from i in proba.name from j in proba1.id_person from k in proba2.last_n...

ASP.NET MVC Page - Viewstate for Confirm email field is getting erased on Registration Page if validation fails

Hi I have a Registaration page with the following fields Email, Confirm Email, Password and Confrim Password. On Register Button click and post the model to the server, the Model validates and if that Email is already Registered, it displays the Validation Error Message "User already Exists. Please Login or Register with a different e...

How to use SOAP in asp.net mvc

A 3rd party site sends its notifications after my web application has completed some action in order to notify me of its succes. Receiving a notification item requires a response back to the 3rd party server (URL) with the a containing the value "accepted". I have never user SOAP and with the basic info found I'm a bit lost for the case...

Get an Entity in Save Method, What is correct form ?

Hi everybody I'm begginer in asp.net mvc and i have some doubts. P.S: I'm using DDD to learn I have an ACtion in a Controller and it'll save an entity (from my model) by a repository (for a database). My doubts is, How can I get the informations from the View and save it by a repository in my Controller ? Is it correct to get an enti...

search with list of comma seperated values using linq to sql

What is the best way to handle the following database search scenario using asp.net mvc, sql server and linq to sql? I have a simple search for people, by their first name and last name. Based on the results, I would like to dynamically filter the results base on the people's City and Business. This could be multiple cities or busin...

ASP.NET MVC Using Multiple user controls on a single .aspx(view)

I am getting this following error , when i am tring to having two user controls in one page. The model item passed into the dictionary is of type 'System.Linq.EnumerableQuery1[Data.EventLog]' but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable1[Data.Notes]'. <%@ Page Title="" Language="C#" Mast...

How to return dynamic CSS with ASP.NET MVC?

I need a solution that lets me accomplish the following: Returning CSS that is dynamically generated by an action method Choosing CSS file depending on request parameter or cookie Using a tool to combine and compress (minify) CSS I am currently considering why there is no CssResult in ASP.NET MVC, and whether there might be a reason...

MVC + Repository Pattern - Still depends on Data Model?

I've started a project for school in which I am using ASP.NET MVC 2 + LINQ2SQL, and a business layer so my UI doesnt interact with the DB directly. My question is this: In my MVC project, when bringing up views and passing around data, I still have to include my Data project for access to the classes in my Linq2Sql project. Is this corr...

Is it possible to use Data Annotations to validate parameters passed to an Action method of a Controller?

I am using Data Annotations to validate my Model in ASP.NET MVC. This works well for action methods that has complex parameters e.g, public class Params { [Required] string Param1 {get; set;} [StringLength(50)] string Param2 {get; set;} } ActionResult MyAction(Params params) { If(ModeState.IsValid) { ...

Suggestions In Porting ASP.NET to MVC.NET - Is storing SiteConfiguration in Cache RESTful?

I've been tasked with porting/refactoring a Web Application Platform that we have from ASP.NET to MVC.NET. Ideally I could use all the existing platform's configurations to determine the properties of the site that is presented. Is it RESTful to keep a SiteConfiguration object which contains all of our various page configuration data in...

TDD in ASP.NET MVC: where to start?

Hello, I'd like to start with TDD in ASP.NET NVC. Getting links pointing me to some ressources for absolute beginners on that matter would be helpfull. (why, when, how to write tests). Also, some advices on how to tackle the subject are welcomed. Thanks for helping ...

What is the Intended Usage of the ASP.NET Session?

In an ASP.NET application you can store pretty much anything in the Session as long as you can handle the cost. What is the intended usage and what is most frowned upon when using the Session to store data? ...

What Patterns Should I Apply to ASP.NET MVC Areas?

What is the best way to model MVC Areas for my Application? Can I manage these Areas dynamically? What is the best usage of them? Thanks ...

ASP.NET MVC Page - hyper links in HTML.ValidationSummary

Hi I have Registration page and if the validation fails, it displays the error messages using HTML.ValidationSummary control. Now i have to display the Hyperlink in that Validation Error Message. But it is treating href also as string. The Validation Message that I am trying to display with hyperlink is: **"User already exists in the ...

Ideas for OpenSource FORUMS in ASP.NET MVC?

I am in the process of collecting ideas for building an opensource FORUMS based on ASP.net framework. I have choosen ASP.NET MVC with Jquery as the tool to develop this. You can add your points or add some depth to any of the above feature. ...

dotnetopenid attribute extensions just not working for me!

So here's some code on the request:- IAuthenticationRequest req = openid.CreateRequest(Request.Form["openid_identifier"]); //add extention requests here req.AddExtension(new ClaimsRequest { Email = DemandLevel.Request, B...

difference between mvc1 and mvc2

what is difference between mvc1 and mvc2 ? everything that is in mvc1 is in mvc2?I am asking this question because there is a debate in my place of work as we can find many resources and ebooks on mvc1 not mvc2 so we should use mvc1 in our portal. same ajax functionality can be implemented in web forms as well as in mvc or mvc2. or ther...