I'm using the httpcompression module from blowery. It works great with asp.net mvc except on the root url, www.samplesite.com/. On all others it's great, www.samplesite.com/Countries for example.
Is anyone here using this module or any other compression module with asp.net mvc ?
...
I am developing a website which will be having both asp.net pages and MVC pages in it, So I have BaseWebPage class which will be used for both asp.net pages and MVC Views. but My BaseWebPage class is inherited from System.Web.Mvc.ViewPage, So Will there be any code/ functionality break for normal asp.net pages, because System.Web.Mvc.Vie...
My application uses MVC validation explained here:
http://blog.stevensanderson.com/2010/01/28/validating-a-variable-length-list-aspnet-mvc-2-style/
And it works fine with both server and client validation when the form is posted. However my problem is that I would like to have client validation on one of the fields before the form is po...
Hello,
I've installed full version (not RC nor Beta) of Visual Studio 2010, a then setup within Web Platform Installer 2.0 announce me that I need to install MVC 2.0, so i did it.
When I want to create project "MvcWebApplicationProjectTemplate" in VS I have following message:
error: this template attempted to load component assembly '...
Hi guys,
I have a very simple data entry form to implement. It looks like this:
Obviously I have mocked out the actual requirements but the essence is similar.
Entering a name and clicking history should bring up a pop up pointing to the url '/student/viewhistory/{name}'
Name and age are required fields
The sub form (in the mockup...
How can I create generic class from System.Web.Mvc.ViewPage
...
In database I have Contacts table:
ContactID (int)
FirstName (varchar)
LastName (varchar)
...
XmlFields (xml) // This field is xml type
To create a new contact, I created two classes - one for regular fields and other to display fields from XmlFields field.
In Controller, I have following:
public ActionResult Create(Contact contact,...
Can I Implement Caching in MVC, If so how? I wanted to implement Cache in Controllers
...
Well i have a complex form view model like this :
public class TransactionFormViewModel
{
public Session SessionRecord { get; private set; }
public IEnumerable<Resource> ResourcePerSessionRecord { get; private set; }
public Person PersonRecord { get; private set; }
public decimal SubTotal { get; private set; }
publi...
What is considered good practice for querying entites from a database using a simple string as a query parameters. Who should implement the method that "converts" the string to an Entity, and who should call this method? The repository, the entity, or some other object, like the controller in an MVC application?
For a more concrete exam...
How do you render a view as a string from a controller in MVC 2?
In MVC 1, I used CaptureActionHtml. I'm having the same problem with it as a similar question, but is there a way to do this without Rhink.Mocks?
...
I have a JSON request, but it seems that it is not hitting the controller. Here's the jQuery code:
$("#ddlAdminLogsSelectLog").change(function() {
globalLogSelection = $("#ddlAdminLogsSelectLog").val();
alert(globalLogSelection);
$.getJSON("/Administrative/AdminLogsChangeLogSelection", { NewSelection: globalLog...
I'm going nuts over what should be a very simple situation. In an ASP.NET MVC 2 app (not that I think this matters), I have an edit action which takes a very small entity and makes a few changes. The key portion (outside of error handling/security) looks like this:
Todo t = Repository.GetTodoByID(todoID);
UpdateModel(t);
Repository.Sav...
have an action that generates active vacancies. The code is below;
public ViewResult OpenVacancies()
{
var openvacancies = db.GetActiveVacancies();
return View(openvacancies);
}
I want to use this list on several pages so i guess the best thing to use is html.renderaction (please correct me if i ...
Hi
I am working on migrating the ASP.NET apllication to MVC Framework.
I have implemented session timeout for InActiveUser using JQuery idleTimeout plugin.
I have set idletime for 30 min as below in my Master Page. So that After the user session is timedout of 30 Min, an Auto Logout dialog shows for couple of seconds and says that "You...
For a small/medium sized project I'm trying to figure out what is the 'ideal' way to have a domain layer and data access layer. My opinions on coupling tend to be more towards the view that the domain models should not be tightly coupled with the database layer, in other words the data access layer shouldn't actually know anything about ...
I have a problem showing the image form database in a view Details and a ImageController. Inside the view I have:
img src=Url.Action("GetFile","Image", new {id= Model.id})
and in controller:
public FileContentResult GetFile(int idl)
{
//int idl = 32;
SqlDataReader rdr; byte[] fileContent = null;
...........
return Fil...
Hi all
I am trying to learn MVC2, C# and Linq to Entities all in one project (yes, I am mad) and I am experiencing some problems with DropDownListFor and passing the SelectList to it.
This is the code in my controller:
public ActionResult Create()
{
var Methods = te.Methods.Select(a => a);
List<SelectListI...
I just upgraded from VS2010 RC to RTM. Now my areas aren't working. I have a Profile area with a Home controller and an Action method Index().
If I try: http://localhost:4951/profile I get a 404 error saying that the resource can't be found. If I try http://localhost:4951/profile/home I get the same error. However, if I try http:/...
Hello,
I have a controller that is being called twice from an ActionLink call.
My home page has a link, that when clicked calls the Index method on the Play controller. An id of 100 is passed into the method. I think this is what is causing the issue. More on this below.
Here are some code snippets:
Home page:
<%= Html.ActionLink(“...