I have an application that has an public 'end user' mode and a 'back office' mode. Both 'modes' pretty much share the same controller logic but the user interfaces for these different 'modes' are radically different.
Using the out of box default routing that you get when a project is created for the first time I have something like the ...
Hello,
I am having trouble with the with mvc2.
I am using the Entity Framework as my ORM. I have used the POCO Entity Generator to create POCO objects. I moved the generated objects to a separate project. I followed steps outlined here(Tutorial). This is my project structure
Sports.Data - Entity Frmework and Data Access
Sports.Entiti...
I have a controller action that is receiving a complex object via JSON. The object has a property on it that is declared as an abstract type. Currently, the action method never gets executed because when the JSON object is deserialized it chokes on the abstract type.
How can I customize the deserialization phase so that I can supply th...
In ASP.NET webforms I used to write AJAX apps where the client would communicate to the server using web services or page methods and JSON.
I'm new to ASP.NET MVC and have found that one could use web services or controller actions that use JSON. Are there other options? Should I use web services or controller actions and why?
...
I'm a total noob at Dynamic Data and I need help.
I have an existing MVC 2 .net web application in which I would like to include Dynamic data. This here worked fine, but I wanted to have a Dynamic data project in my solution and then add a pre-build event that would copy only the needed files from the DynamicData project to my webApplic...
In MVC 2 we can create areas easily. Now my question is related to nested areas (areas inside of areas).
Select my "father" area folder, Right-mouse-click > Add > NO option for a new Area.
Is it possible to do it in some other way ? or will this option be available in the near future?
...
Hello
The title contain my whole question.
...
I'm recieving the following error message,
A public action method 'RenderMenu'
was not found on controller
'Web.Controllers.SiteController'.
However this action DOES exist and the controller does exist (As it work everywhere on the site) I looked at the inner exception.
Execution of the child request failed.
Please examin...
A common scenario I encounter is providing notifications / confirmations to users after they have performed an action to inform them of success.
For example, suppose a user provides feedback on a feedback form and then clicks Submit Feedback. You may want to display a 'Thanks for your Feedback' message after you have performed some vali...
Hello There
I am trying to make the move from PHP to ASP.NET. I have about 10 years experience with PHP, and 4 with C#.
But I having problems with the authentication and membership system in ASP.NET. So i have spend quit a lot of time finding a guide on how to create a membership provider for a custom database setup from scratch, but i ...
I'm trying to iterate through a complex type binding in jQuery to submit the Json representation through to an IEnumerable action parameter.
Html
<input type="hidden" value="0" name="value.index" />
<input type="text" value="textone" name="value[0].InputValue" id="value[0].InputValue" />
<input type="hidden" value="0" name="value[0].Id...
Hi,
I'm using MVC2 and VS2010 developing a website and need to use Application State global values. I can set a value like 'Application["hits"]=0;' in Global.asax but when trying to use the same in an MVC controller always get the following error:
The name 'Application' does not exist in the current context
I have also tried using in...
I have model
public class MyModel
{
public string Name { get; set;}
}
I have html code
<div id="Name">Important data</div>
In Controller, i have a method
public ActionResult Index (MyModel model)
{
model.Name == "Important data"
}
Is it real, using standart model binder? thx)
...
If I have the following MVC Action:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult GetDocument(int id, string fileName)
{
// ..... //
return File(fileStream, "text/plain", fileName);
}
I want to call the action on a click of a table row using jQuery. But I'm a bit confused, because I don't think I want an Ajax call here do...
General question to experienced developers:
I want to develop a secure an area on my local machine which I will then roll up to the remote server.
I am using IIS 6 with MVC2 on VS 2008.
I understand that the SSL provider will only issue a certificate to a given domain, which while I find this logical, cannot figure out how to build l...
Lately when I've been building my asp.net mvc apps I tend to have a number of items that consistently need to be calculated, formatted and configured in my master pages. Some of these items include:
I like to attach specific classed to the body tag like WordPress does to help my CSS out. I usually attach the name of the action, control...
I have been trying to figure out the best way to make a secure membership area.
I considered doing something like https://www.users.examplesite.com/ but it seems like a lot of trouble to do, also I am using areas in the rest of the app and that looks like double the complication.
Could I just assign the SSL certificate to the root and ...
Hi,
I discovered NHaml some days ago and it's a great project.
When I try to use MVC2 Html helpers like Html.LabelFor(), Html.TextBoxFor(); the views won't compile.
Example:
error CS1061: 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'LabelFor' and no extension method 'LabelFor' accepting a first argument of type 'Sys...
I'm using the following route
routes.MapRoute(
"PatientList",
"User/{SearchName}/{LocationID}/{Page}",
new { controller = "User", action = "Index", SearchName = "", LocationID = 0, Page = 1 }
);
It fails on the following URL: /user//1/1
Can anyone tell me what I'm doing wrong?
...
I am quite frustrated with Entity Framework as most of the tutorials only show how to use it with one or two tables, and not multiple tables with relations. I was thinking of the following 'hack' to get my job done quickly: Create and Import procedures in the EF ORM to do most of the CRUD where multiple tables come into picture.
What a...