My original question was a bit confusing, so let me edit this post to be more clear:
How can I generate an ActionLink that not only uses the Routing engine, but also takes you to an html element with particular ID on a page? I want to generate something like this:
<a href="/ControllerName/ActionName/#section2>Link</a>
or sometimes t...
First; I know that I should not need to test the internals of MVC but I REALLY need a suite a tests around data flowing into our system.
How can I, I hope without mocking all of HTTP context, test that objectA (form collection, dict, collection, object, etc) does or does not conform to objectAModel?
I'd like to not have to instantiate...
In my Site.Master file, I have 3 simple ViewData parameters (the only 3 in my entire solution). These ViewData values are critical for every single page in my application. Since these values are used in my Site.Master, I created an abstract SiteController class that overrides the OnActionExecuting method to fill these values for every Ac...
I am trying to build an multilanguage application in asp.net MVC with the support to update the resource file online. I found lot of resources for asp.net web forms but could not find any example for MVC. Could any one tell me how can I do this.
Thanks in advance.
...
Hello,
I was just going through the "AccountController.cs" code (the default one which appears when you create a new ASP.NET MVC project). When I tried to compare it to the one that is proposed in my book, I noticed that the two controllers share the same concepts and implements the same methods (LogOn, LogOff, CreateUser, DeleteUser, C...
In my MVC application, I'm registering all of my controllers using reflection in the Application_Start handler. This basically creates all types that are used on any controller parameter and adds it to the container.
I now have a situation where I have multiple parameters on my controller that are of the same type. Here is a simple exam...
There are several companies providing beta access.
It looks like it could be a great pay as you go, and expand, service.
However, I'd like to hear if anyone had difficulties in getting Microsoft stack web apps running on one. Either asp.net or asp.net-mvc, with MSSQL 2005.
...
Ok, I have a role based permission system in place and would like admin's to be able to edit the permissions for each role. To do this I need to load lots of checkboxes, however I'm struggling with getting the return data from the View
Please Note: I have looked around, I have found similar questions but as of yet cannot find a solutio...
Just a random question. I've been in internship and then working as a software designer for almost a year now, mainly with SQL Server 2005 / 2008, and Visual Studio 2008 with ASP.Net VB / C#, web software development. We recently started a project with ASP.Net MVC, and I just don't get this stuff.
The concept of Views, Controllers, Mode...
I want to use a RedirectToRouteResult to redirect to a url like /users/4#Summary. Using ASP.NET MVC 1.0, I haven't been able to find a way to do that - have I missed it?
...
Hello all,
Below is my action link how shall i apply css to the following ,actually i want to give the class as we do in asp.net simple application.please tell me what shall I do
<%=Html.ActionLink("Forgot password?", "ForgotPassword")%>
Thanks
ritz
...
I have an application with a repository layer (and a nhibernate implementation), service (bussiness) layer, and an asp.net mvc in the web layer.
Because I also need to create a small silverlight application I will create several wcf services. This calls to use DTO's, but I don't know how & where to create them.
I've seen some links (li...
I would like to try developing ASP.NET and ASP.NET MVC apps in F#. I enjoy using functional langauges, and to my mind the functional paradigm fits better with HTTP and the web than imperative programming (though of course F# can do both).
I am only intending on trying F# for some personal projects, though I hope that eventually F# will ...
I'm currently trying to set up a website that uses both windows authentication and forms authentication. I am using ASP.NET MVC and both IIS6 and 7 need to be supported. How would I go about letting known AD users into the app (their AD id is stored against their user record in the application database) and directing everyone else to a...
right now in each of my controller classes i am instantiating a new Repository class to access my DB. Is there a way i can simply create this once (a single repository instance shared across all controllers) and pass into all controllers ?
...
I'm experimenting with javascript and css caching in ASP.NET MVC. Is it possible to intercept calls to the server for these types of files?
For example, if a request gets to the server for
~/Scripts/Something.CurrentVersion.js
I would like to intercept this call and tell the server to return
~/Scripts/SomeOtherFile.js
Would it be p...
what's better to have a view for create and one for edit or one for both ?
...
I'm working on a bit of MVC where I'm needing to dynamically route a form to a certain action and parameter combination. So far, I've got this:
PageViewModel
{
public string Action {get;set;}
public string Parameter {get;set;}
/*... other properties for the form */
}
PageController
{
public ViewResult MyAction(string myParamte...
public class Dinner
{
public string ID { get; set; }
public string Title { get; set; }
public Category Category { get; set; }
public DateTime? DateCreated { get; set; }
}
Model view for that class (important part) is
public class DinnerModelView
{
...
[UIHint("DatePicker")]
...
Is it possible to have a link that attempts windows integrated security authentication on one of my pages in an project where the web.config is set to Forms?
...