Now that idselector has been upgraded to RPXNow and you can't "just use" the selector code, what is a good replacement?
I want to implement OpenId on a new website that I am using, but the users are going to be just dumb when it comes to logging in unless I provide an easy way for them to.
As a reference, I will be using .Net Open Id f...
Is there a proper way yet to unit test views with the aspx view engine?
I've been playing with various ways that will let me get a parseable string as a result like :
view.RenderView(viewContext);
But I'm not having any luck so far.
Most of what I've read strays into integration test territory. Integration test overlap a fair bit bu...
Hey all!
I have an action which I need to post forward onto another action if it meets certain conditions, but I am unable to preserve the form data when passing through to the next action.
The receiving action accepts a FormCollection, which the sending action
Currently, I am doing a return RedirectToAction("action","controller", fo...
Background
We are a TDD team who have inherited a legacy ASP.NET application and are trying to bring it under control by separating presentation, business and data access concerns and thereby improving testability. We have had some success using an MVP pattern for newly added pages but are investigating the MS MVC framework to see if it...
For a POST method, the W3 specs say:
If a resource has been created on the origin server, the response
SHOULD be 201 (Created) and contain an entity which describes the
status of the request and refers to the new resource, and a Location
header (see Section 10.4).
http://www.ietf.org/internet-drafts/draft-ietf-httpbi...
I want to write a custom view engine that returns custom text (like coma delimited) does anyone know how I'd change the view engine on the fly to handle this?
...
Using asp.net MVC I'd like to do this inside a view:
<%= Html.TextBox("textbox1", null, new { class="class1" }) %>
This statement does not compile because class is keyword in C#. I'd like to know how I can escape the property names such that this compiles.
It is possible to get this to compile if I change the "class" property to "Cla...
How do you retrieve the matching route for a URL (in string format)?
Basically something like...
Routes.GetMatchingRoute("http://mysite.com/foo/bar/1");
Without having a HttpContext.
Basically I would like to RedirectToAction using a referring URL.
...
For Example:
Let's say that I want to return a view that displays a list of cars and also show a section of dealers in your area. These are two disjointed pieces of data.
My view inherits a list of cars like the following:
public partial class CarLot : ViewPage<List<Cars>>
{
}
Now from the controller I can return the view like the ...
Hi All,
I am struggling a bit to figure this one out.
I'm working on an ASP.NET MVC project, using LINQ to SQL for my data layer. The database consists of 10 or so different "exceptions" tables, e.g. "Exceptions.LADM", "Exceptions.USB", "Exceptions.GPO". Basically these tables are tracking user+machine information for relaxation of va...
I'm learning MVC and am having trouble deciding when I should create a new controller versus just adding an action and view associated with an existing controller. On the one hand, Single Responsibility would seem to say a controller should be limited to a few actions. When I try this, though, the number of classes grows exponentially ...
Whenever I use Html.ActionLink it always Html encodes my display string. For instance I want my link to look like this:
<a href="/posts/422/My-Post-Title-Here">More…</a>
it outputs like this: More…
&hellip is "..." incase you were wondering.
However the actionlink outputs the actual text "…" as the link text. I ...
I'm really new to ASP.Net Mvc, but not new to Asp.Net. I was aware of all of the HtmlHelper class, but I was having problems with ecoding issues using Html.ActionLink. I asked a question here and got an answer right away about using the UrlHelper class, which I had no idea even existed.
My question is, are there other classes like this ...
I want allow the user to customize their web pages on my ASP.NET MVC website, so they can use their own style sheet. In MVC, the stylesheet link is placed in the section of the master page. How can I dynamically link to CSS in master page based on the user (that is, I will look up my table to find the CSS for a specific user and link to...
Hi,
I wish to use a modelbinder I've made directly on an action method parameter. Such as:
public ActionResult MyAction([ModelBinder(typeof(MyBinder))] string param1)
However, I need to pass a string into the binder itself, so I was wondering if you could do something along the lines of:
public ActionResult MyAction([MyBinder("mystr...
Hello. I'm having a little problem with my NHaml config:
<configSections>
<section name="nhaml" type="NHaml.Configuration.NHamlConfigurationSection, NHaml"/>
</configSections>
<nhaml AutoRecompile="true">
<assemblies>
<add assembly="Microsoft.Web.Mvc"/>
<add assembly="MyAssembly"/>
</assemblies>
<namespaces>
<add ...
Here's what I'm trying to do :
I have an entity Task with a TaskName property and a TaskPriority property.
Now, in the html I have :
<td><%=Html.TextBox("Task.TaskName") %></td>
<td><%=Html.DropDownList("Task.TaskPriority",new SelectList(ViewData.Model.TaskPriorities,"ID","PriorityName")) %></td>
The Controller action is like this ...
I am working on an ASP.NET MVC project were I am using routing to produce friendly URLs and have an issue I am not sure how best to solve.
The routing I have setup work like the following
{category}
{category}/{manufacturer}
{category}/{manufacturer}/{product}
The problem I have is that I want to display matches to the same route in...
I'm developing a web application and I need to mix Forms & Windows authentication together.
The approach which I selected is this: authentication method on all the web site has to be forms auth. There is a form page (~/home/Login) to login in via forms auth. The magic (and trouble) is that only one page (say ~/Home/WinLogin) has to hav...
update: I know there is no one best way to do everything. Sorry for not saying that right off. In the context of the data-access tutorials, if you had to do the project he did in that tutorial, would you do what he did or would use use MVC, if you had to choose one of them?
Thanks.
update: Is MVC the more approriate way to program a...