I'm wanting for every view in my system to have some static help content. The way I was thinking about doing this would be to set up a parallel structure for the static content and create a route to rewrite the URL to this. For instance:
/Controllers
/Help
/Account
/Login.htm
/Create.htm
/Models
/Views
/Account
/Login....
I am looking into using a side bar menu option. This will only be displayed on some aspx pages. Can I insert in the site master, with a toggle condition, or do I go the tedious route of adding menu.ascx on each aspx page? I know how to add individually, but can I go the simpler Site.Master route?
...
I've been using the Grid of the Telerik MVC Extensions with great success, it's a great component. But now I need it's text to be in spanish.
Looking for in the source code, I've only found that I can enable Globalization like this
Html.ScriptRegistrar().Globalization(true);
But all this line does is inserting some jQuery that tells...
I am attempting to find the optimal method of guarding against Cross Site Scripting in my ASP.NET MVC application. I planned to use Microsoft’s AntiXSS library and essentially guard on two levels: 1) Protect regular textboxes (i.e. those that should only contain plain text and 2) Protect rich text boxes which can generate HTML. The libra...
I am writing a questionnaire in ASP .NET MVC. The format of the questionnaire is one yes/no question per page. The questionnaire is a safety questionnaire where, for the majority of the time the user will answer no to the questions. Should I set the default state of the radio buttons to 'no' to save the majority of the users time (enhanc...
I have the following functions in my ProceduresControlller:
Function Add(ByVal bpid As Integer) As ActionResult
Return View(GetAvailableProcedures(bpid))
End Function
<AcceptVerbs(HttpVerbs.Post)> _
Function Add(ByVal bpid As Integer, ByVal code As String, ByVal covered As Boolean) As ActionResult
AddProcedure(bpid, codes, cove...
I'm in the process of adding ASP.NET MVC code to a preexisting ASP.NET Webforms project. The various tutorials suggest adding routing to a method called from Application_Start() in Global.asax. My Global.asax already has an Application_OnStart(Object,EventArgs) method with some setup code.
If I try to have both Start and OnStart, the On...
In one of the enterprise-level projects, we are using ASP.Net MVC for the web application portion. The reporting system is a huge system with hundreds of reports plus adhoc reporting, printing and notifications, the whole nine yards.
Although we are using MVC for the web portion, the reporting doesn't need to be in the same technology, ...
Hi,
i have a custom SiteMapProvider which I populate from a database. I also have a custom SiteMapNode which has to be constructed with a custom Page argument.
The implementation of SiteMapProvider.IsAccessibleToUser(context, node) is now:
Public Overrides Function IsAccessibleToUser(context, node) As Boolean
Return CType(node, Cu...
In my view I currently have the following code:
<%= Html.Hidden("Cart.CartID", Model.Cart.CartID) %>
When the page initially loads, CartID is null so when I view source on the page the value is set to "". When I submit the form on the page (adding a product), the controller code will create a new cart and using a strongly typed viewm...
I am looking for a starter kit that already is set up with the following?
ASP.NET MVC 1.0
Jquery/Jquery UI/JqGrid/
Sparkview engine
NHibernate
Code quality is important as well. Thanks in advance.
...
What would be a valid regex for a MVC route constraint passing a bool? For example, I have the below route:
routes.MapRoute("MenuRouteWithExtension", "Menu.mvc/{action}/{projectId}/{dealerId}/{isGroup}", new { controller = "Menu", action = "RedirectUrl", projectId = "", dealerId = "", isGroup = "" }, new { projectId = @"\d+", dealerId ...
I use the latest version of ASP.Net MVC 2 RC.
My question is, how do I redirect from one action that's in the "Blog"-area to the index-action in the home-controller that exists in the "root" of my application (no area)?
I tried:
return RedirectToAction("index", "home");
but this redirects to /Blog/home, where Blog is the name of my ...
Is there any way to get information from my model during a result flagged HttpPost if I cannot pass it as a parameter?
[AcceptVerbs(HttpVerbs.Post)]
public FileUploadJsonResult Upload(HttpPostedFileBase file, IwantMyModelToo! )
I can't really get the actual view model to go through the method, though. Any thoughts?
Here is th...
Hi,
When I started using xVal for client-side validation, I was only implementing action methods which used domain model objects as a viewmodel or embedded instances of those objects in the viewmodel.
This approach works fine most of the time, but there are cases when the view needs to display and post back only a subset of the model'...
I have a complex ViewModel object being used in a base controller class. For simplicity it looks like this:
public class FruitBowl
{
public Apple[] apples;
public Banana[] bananas;
}
public class Apple
{
public string appleType;
}
Now, if I called TryUpdateModel(myFruitBowlObj, "apples[0]"), the model binder will identif...
Hello,
I am coming up on the end stages of an Asp.Net MVC 1.0 project in VS2008 / Framework 3.5, and trying to do some performance optimizations. In my project, I have a few different "themes" that are used, depending on the role of the logged in user. My themes folder structure is like so...
\Themes
\Theme1
\Css
...
Hi all,
I have a form that, when submitted, shows a busy animation and disables the submit button.
Anyone know how to query Microsoft's Sys.Mvc.FormValidation to see if the form passed its test so I can prevent the busy animation showing if the form hasn't actually been submitted? Is there some other work-around?
At present my client ...
Hi,
I am building a simple web site for a client and this is my first time with ASP.Net Mvc.
For the production i need to use MVC 1.0 and the most efficient way to saparate Admin logic from the rest of this site is using Areas.
The fact that i couldnt use MVC 2, so i have used the Haacks area prototype and everything was ok.
I want to...
I have an ASP.NET MVC App, where I have interfaces for each viewmodel.
On a view called /Product/Details/50 I can edit details for product with id = 50.
I use strongly typed views, with the type being IProduct. I use Castle Windsor to do DI. When I post the edit form on the /Product/Details/50 view, the IProduct instance defaults to wh...