I am trying to figure out the best way to create a navigation menu in ASP.NET MVC that can change based on the controller action from which it was built (it would also be different based on user permissions and such). The navigation menu is displayed in the Master Page, and all of our views are strongly typed.
I wanted to use OnActio...
Visual studio creates an asp.net MVC application as a project I want it to be created like an asp.net website, will it give me problems if I force it to do so by creating all the folder and references manually?
...
I don't exactly understand how ASP.NETs ActionLinks work. I see that they have a event handler for OnSuccess and OnFailure, but I can't find anything that describes how success and failure is determined.
I'm building an ASP.NET MVC application and within it I have a Ajax.ActionLink that allows me to "vote" on items using AJAX...similia...
I installed asp.net mvc and then followed it up by installation of visual studio 2008 express. When I do new project I dont see mvc template to choose from.
How do i add the asp.net mvc template for visual studio to know where it is?
...
I have a flash upload component I want to use to upload multiple files. I'm using it in a MVC app and what I want to happen is that the user picks the files they want to upload, it uploads them and then displays a page showing all the files they have uploaded so they can add a description and select where to save them, and then save the ...
Hi,
I'm looking to parse html using .net for the purposes of testing or asserting its content.
i.e.
HtmlDocument doc = GetDocument("some html")
List forms = doc.Forms()
Link link = doc.GetLinkByText("New Customer")
the idea is to allow people to write tests in c# similar to how they do in webrat (ruby).
i.e.
visits('\')
fills_in "...
The project template for ASP.NET-MVC includes an AccountController that contains the following piece of code
protected override void OnActionExecuting(ActionExecutingContext filterContext) {
if (filterContext.HttpContext.User.Identity is WindowsIdentity) {
throw new InvalidOperationException("Windows authentication is not su...
I am in the process of converting views from ASP.NET MVC TagSoup to using Spark. However, I can't figure out if there is an analogue to ASP.NET Nested Masters in Spark layouts.
If this isn't there, would the best approach be to use partials?
...
Creating a default ASP.NET MVC project in Visual Studio sets up a basic project where you can register a user. How would I go on changing this to use a MySQL server instead of SQLServer ?
...
The Scenario
I have an application where we took the good old query string URL structure:
?x=1&y=2&z=3&a=4&b=5&c=6
and changed it into a path structure:
/x/1/y/2/z/3/a/4/b/5/c/6
We're using ASP.NET MVC and (naturally) ASP.NET routing.
The Problem
The problem is that our parameters are dynamic, and there is (theoretically) no lim...
Can I map an action's parameter to a different name?
I want to use reserved words as parameters for an action, such as:
search?q=someQuery&in=location&for=x
So "in" and "for" can't be used as parameter names of the method.
Is there a built in feature for that or should I create a model binder?
Thanks.
...
Is there a better way to format text from Twitter to link the hyperlinks, username and hashtags? What I have is working but I know this could be done better. I am interested in alternative techniques. I am setting this up as a HTML Helper for ASP.NET MVC.
using System;
using System.Collections.Generic;
using System.Text.RegularExpressio...
Hello,
I have records that have "FirstName" and "LastName" for individuals, and "CompanyName" for companies. Both records reside in one single table, and I know whether it's a company or an individual through an IsCompany Bit field in my table.
The problem I face now is that I need to show those in one ordered grid, in the form:
Last...
I've got some things I do in the OnActionExecuting method in a BaseController, that all my other controllers are based off of.
I'm doing some simple things like putting a variable into ViewData that "nearly" all of my views will need, and populating a couple properties that my controllers use.
Thing that bugs me is, this work is being ...
Installed ASP.NET MVC
Created Project
About 2 minutes into project (not even running / building / debugging)
Visual Studio 2008 will no longer take focus from the mouse.
Click on visual studio - seems like there is a modal open somewhere.
Windows + D... no modal
Can't see VS2008 in alt tab
Only way to get it back is task manager.
Happen...
Hey there.
This may already have an answer here but I can't seem to find the right search string so..
I have, almost the same as the comments in SO, a page that has many instances of the same PartialView.
The partial view has a button in it that when pressed adds a comment associated to the product the PartialView represents.
I can e...
I am using the following code from MVC Storefront to test OpenId in MVC. How do I integrate it with my ASP.Net Membership so I can use roles and save a user name for the user in my tables? I believe that SO is also using something similar.
public ActionResult OpenIdLogin()
{
string returnUrl = VirtualPathUtility.ToAbsolu...
Hi all,
I'm studing Microsoft ASP MVC framework. Here is something strange of my page.
I have two drop down list on the page. The first one post the form back, passing parameters to the controller. The controller update the second drop down list and other controls, like two text box. I do pass the data to the viewdata. And assigned the...
Hello,
is there a way to do good commenting in an ASPX page (actually an ASP.NET MVC View - but it's the same thing, HTML content) without having all those comments sent to the client browser?
I like good commenting but I don't want to send all those lines of comments to visitors. Any way to prevent that (different comment tag or workar...
ASP.NET has four different types of file results:
FileContentResult: Sends the contents of a binary file to the response.
FilePathResult: Sends the contents of a file to the response
FileResult: Returns binary output to write to the response
FileStreamResult: Sends binary content to the response by using a Stream instance
Those d...