Is there a way to force the request router to disambiguate controller actions based on method signatures?
for instance(in a controller):
[HttpPost]
public ActionResult MyAction(FormCollection f) {
//do stuff with big form and return viewresult
return View();
}
[HttpPost]
public JsonResult MyAction(string foo, string bar, bool ...
I wrote a query that gets a list of objects using linq. The code executes fine in the project, but fails when I try to access it from the fitnesse project.
base(global::System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString, mappingSource)
I guess it has something to do with the connection strin...
I am using ItextSharp and I am getting a new font for it by doing this
string fontPath = Path.GetFullPath("C:\\BMSApplicationFiles\\Fonts\\FREE3OF9.TTF");
BaseFont barCodeBase = BaseFont.CreateFont(fontPath, BaseFont.CP1252, BaseFont.EMBEDDED);
That file is in that directory on both my dev machine and the server.
When i run this on m...
So I'm writing a post on my wall and type a URL into the main body of the post. As soon as I finish the URL, Facebook creates a little section underneath which has the title, description, and an image from the url I typed.
Without getting too indepth, how is this done and what is the best way of make something similar myself?
...
I've encountered this problem all of a sudden doing a simple ajax submit of a form. The JSON comes back formatted correctly but the browser prompts to download it. Fiddler shows the content-type as correct:
application/json; charset: utf-8
Here's my javascript:
$("#submitbutton").click(function(e) {
$.post('FormTest', function(o) {...
This is my custom model binder code for the BaseContentObject class:
public class BaseContentObjectCommonPropertiesBinder : DefaultModelBinder
{
public override object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
{
if (controllerContext == null)
{
throw new Argume...
I'm attempting to process the body of an HTTP PUT request, but it seems that the MVC engine (or perhaps the ASP.NET stack underpinning it) isn't automatically parsing & populating the request's Form collection with the body data.
This does work as expected when doing a POST.
Note that the request's InputStream property does contain the...
Hi
I been trying MS Test manager 2010 and man it sucks bad. It's got huge potential but right now it sucks and is too buggy and crashes on all my development machines every few mins.
So is there any free software what can sort of do it the same thing?
Like what I liked about it is this.
It had a nice check list on the side you woul...
Hi Guys,
I have companycontroller, index view and I need to create a link to dispaly all contacts for this company,
this is working but YUK, How can Refactor this:
<%: Html.ActionLink("Contacts", "Index/" + item.CompanyID, "Contacts")%>
thanks
...
Hello All,
I've run into a problem after installing the 64 bit Oracle client onto my Win 7 x64 dev box. I have installed and configured the oracle client and added a reference to it in my library project and it runs without problems when deployed to a Win 2008 R2 server; however I cannot run it in the built-in VS2010 debugger.
The cod...
i want to add some stuff to cookie in ASP.net MVC.
what is best way to handle all stuff in a cookie or more cookie.
any good way to handle cookie in asp.net mvc
...
Hello, I have Html.DropDownList element in View.
<%= Html.DropDownList("ID", (IEnumerable<SelectListItem>)ViewData["VItemID"])%>
In Controller:
ViewData["VItemID"] = new SelectList(_dataManager.myItems.getItems(), "ID", "ItemID");
I want to add option with text="----". I want do it in view layer.
I have done this with jquery, but...
If my Model is Contacts then I can easily get it in controller like this:
[HttpPost]
public ActionResult Create(Contact contact)
...
But if my Model is wrapper for Contacts and something else then in View I display it using Model.contact.
How to get Contact in Controller the same way like I did in first case? I don't want to use Form...
I am looking at databases for a home project (ASP.NET MVC) which I might host eventually. After reading a similar question here on Stack Overflow I have decided to go with MySQL.
However, the easy of use & deployment of SQLite is tempting, and I would like to confirm my reasons before I write it off completely.
My goal is to maintain u...
How to access RedirectToAction() function in Models classes in asp.net mvc2. When i try to write it in one of my models classes it says 'The name RedirectToAction does not exists in the current context'
...
I'm not quite sure I understand what Html.RenderAction() does. I've just noticed one weird behavior when using it:
In View/Contacts/Edit.aspx I used Html.RenderAction("ModalAddNote") which contains form for adding Notes for Contact. This is for ajax usage (it is opened in modal dialog).
Problem occurs when I create method ModalAddNote: ...
I am planning to use MS Ajax Minifier with Asp.Net MVC 2.0 for handling the Js and Css files. Does anyone has experience with MS Ajax Minifier? I have following questions regarding this.
Is it the best way to use JS/CSS files in Asp.Net MVC or is there a better way. E.g. YUI Compressor, Telerik Extension for MVC?
As I understand we ca...
I have an Entity Framework 4 model first layer, where I have a Product base class and then different classes that derive from the class. For each type of Product there is a Partial Class, and then each of the partial classes uses a buddy class for Data Annotations.
[MetadataType(typeof(Product_Validation))]
public partial class Product ...
My client want Entity framework on next project, I am not getting how to start work on Entity framework... How should i start to implement this in my asp.net mvc application?
if anyone can provide me demo project and some good article to start this.
Thanks in advance
...
hi!
i would like to change the way LabelFor render. Can i do that with a DisplayTemplate?
LabelFor generate a label tag and i would like to add a ":" at the end of the label.
thank you!
alex
...