Biggest advantage to using ASP.Net MVC vs web forms
Possible Duplicate: MVC versus WebForms What are some of the advantages of using one over the other? ...
Possible Duplicate: MVC versus WebForms What are some of the advantages of using one over the other? ...
I've got a model... [DataContract] public class DeviceModel { [DataMember(Order=1)] public string Alias { get; set; } [DataMember(Order = 2)] public string Location { get; set; } [DataMember(Order = 3)] public string State { get; set; } [DataMember(Order = 4)] ...
ASP.NET MVC Model Binding is still new to me and I'm trying to understand exactly how it works. Right now, I appear to be having problems with a feature of Html.Textbox() Specifically, I have a View where I set Html.Textbox to a value both in the "Get" and the "Post". It sets fine in the "Get", but after the user submits a value during ...
Hi we have a third party application that exposes a web service for use in building websites. It handles createing sessions , getting product data, shopping cart, and check out calls to the database. I am new to MVC and my question is how do I work this webservice into my mvc site i am building, I want to take advantage of testing as...
<select name="MessageType" style="width: 151px"> <option value="P">P - Proprietary</option> <option value="B">B - BCBSA</option> <option value="S">S - Place Specific</option> </select> How to set the selected value for this Dropdownlist box? <%=p.MessageType%>.. this is the value I am getting from database so that In my ...
From Rails and some people's ASP.NET MVC examples I got the feeling that routes are mostly written in lowercase. C# conventions do require uppercase classes and method names so controllers and controller action's will remain uppercase but I'm wondering if I should start writing routes in global.asax.cs in all lowercase (as opposed to wha...
Anyone have any idea how I start debugging this? Below is what the browser is showing when the error occurs. I've just cut and paste it below. Seems the error is in an auto generated temporary file. Server Error in '/' Application. Compilation Error Description: An error occurred during the compilation of a resource required to se...
Hello. I have to model classes and database tables for a "User" entity. This "User" entity have this properties: User Name Age Gender Email But I have 2 user's type: "Paid users" and "Free users". Each one have his own properties: Paid User Fee Rate Free User Expiration Date Level "Paid User" and "Free User" ar...
What are web parts? What are the benefits and drawbacks to using them? Is there a difference between web parts in ASP MVC and Sharepoint? ...
I am running a MVC2 application (.net 4.0 on IIS7) and when a form is submitted I have to send invoke two external web services, wait for the responses, do something with it, and return a response. The problem is that the web services take about 20 seconds each to reply (this is beyond my control). I decided to move to async controllers ...
I have a very odd problem. Whenever I try to use the "Add View" dialog in ASP.NET MVC2 and then try to "Create a strongly-typed view" by selecting a "View data class" from the drop down of available classes none of the classes ("models") in my MVC project are showing up. The very odd part is all of the assemblies that my MVC project is ...
I just created an action filter that I want to apply to nearly all of my controllers (including any new ones that are introduced later on). I figure a really useful unit test would be one that cycles through each controller and verifies that if certain criteria are met, then the action filter will impact the result. Is it wise to creat...
I've read all of the examples and I've yet to figure out how to get information out of the web.config file using applicationSettings (as opposed to appSettings). I have the following for my configSections: <configSections> <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4...
I've got a small problem with my app design and MVC membership. In my site I have 3 tables: users, customers and authors, none of them are related to one another but each of them is connected to a bunch of other tables so I cannot really combine them into one big users table. I'm not sure how to implement the all membership, authorizat...
Trying to get UpdateModel to work for my User. The User class has basic string properties like CompanyName, FirstName, LastName, etc so nothing exotic. Here is the header for my view: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Public.Master" Inherits="System.Web.Mvc.ViewPage<User>" %> After they submit, in my c...
Hello, How can I authenticate a user (with username and password) of an ASP.NET MVC application? I'm trying to do this using WebClient, passing NetworkCredentials, posting the request to the ASP.NET MVC application from my WPF client. How do I handle this request on the server? How do I get the passed username and password? I'm using f...
Example is fake. ASP.NET MVC: I have a view that renders a student info. Student info consists of First Name, Last Name and (optional) Age (declared as int?). Student info is rendered something like, if age is not specified I want to show "not specified": <span><%= Model.Student.FirstName %></span> <span><%= Model.Student.LastName %><...
Hi guys i'm new to JSon and not too sure how do i pass the data around. I am using ASP.NET MVC as my development platform. In The View: $(document).ready(function() { $("select#Colors").change(function() { var photoCategory = $("#Colors > option:selected").attr("value"); // 1st parameter var userID = $(".userID").att...
So I've been advised a few times to disable lazy loading when building an application with the above frameworks, and that ToList() will force the queries in my repository to execute. I was told that I would avoid certain "traps" I might run into if I used AsEnumerable(). On a recent question, however, I included a bunch of ToList()s ...
Just working on some Spark view engine ASP.Net MVC code. Simplified example (but I've probably written same thing a few times over in similar style). Just doing of thinking.. <content name="main"> <ul> <for each="var userViewModel in ViewData.Model"> <li> <ul> <li>${userViewModel.Identity}</li...