ASP.NET MVC - Can i have multiple names for the same action?
In the same controller... Can i have multiple names for the same action?
I am looking for a complete multiple language solution. Essentially the i want all the logic to be sa same but change the "keywords" (actions, controllers in the url) depending on language.
...
I gave this in my site.master
<li><%= Html.ActionLink("Material", "Index", "Material")%></li>
But my link doesnt seem to get my material controller Index method... I have this in my global asax file,
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
...
I'm trying to google for info on a situation, but I dont know what it is called, so its hard to find results :)
I have a model with say 10 fields. But only some of those are shown on a particular view, lets say 3 of them: id, name, date. What do you call this kind of view that does not display the whole model? A partial view?
The pro...
T4MVC is cool, but I have a couple of issues integrating it in my project, any help is really appriciated:
I've got such warnings for all my actions (I use SnippetsBaseController as base class for all my controller classes:
Warning 26 'Snippets.Controllers.ErrorController.Actions' hides inherited member 'Snippets.Controllers.Base.Sni...
What is the best ASP.NET MVC pattern for paging data when the data is filtered by form criteria?
This question is similar to: http://stackoverflow.com/questions/1425000/preserve-data-in-net-mvc but surely there is a better answer?
Currently, when I click the search button this action is called:
[AcceptVerbs(HttpVerbs.Post)]
pu...
can we use server side controls in MVC, if no then why server side control list appears.
...
I'm trying to implement a plugable architecture in asp.net MVC. I have based my modules on the following article - http://www.wynia.org/wordpress/2008/12/aspnet-mvc-plugins.
I have a DLL that contains a simple controller, and a view. The view is an embedded resource within the DLL.
The problem I'm having is, if I drop the DLL in the bi...
What do you think about putting Get-logic in the getters of a ViewModel? Something like:
public class DummyViewModel
{
public int Id { get; set; }
private DummyObject myObject;
public DummyObject MyObject
{
get
{
if (MyObject == null)
{
DummyRepository repo = new ...
var query = from d in testPersons.person
where d.Name == txtbox
select d;
txtbox is text box on View page.
How change this code to return all
names who starts with any part of
name?
For example: When I type R in text box, on View page, this query should return all names who is start with character R
...
what is the purpose of "Areas" in MVC2
...
Hi,
I have been investigating how My ASP.NET MVC application can log unsuccessful / incomplete downloads. I have a controller handling the file requests which currently returns a FileResult. What I need to record is the IPAddress, filename and when the download started, then the same data and when it completed. I have looked at intercep...
If I have a search object with a list of fields, can I, using the System.ComponentModel.DataAnnotations namespace, set it up to validate that at least one of the fields in the search is not null or empty? i.e All the fields are optional but at least one should always be entered.
...
Hi,
I want to store checkbox value to database by selecting the particular checkbox in asp.net MVC.I mean we check the checkbox and then click save button and the value saved in database.How is it possible. Kindly help me...
Thanks.
...
To begin with: Using Entity Framework v4.0. ASP.NET MVC 2.0. Visual Studio 2010.
I have a model that consists simply of an order & order items. What I want to do is simply bind that model without too much hassle where possible (avoiding type converters, etc).
Simply the model looks like this:
public class Order {
public int ID { g...
can we use WCF in Asp.net MVC and how can we use?
...
What is difference between Asp.net MVC 1 and Asp.net MVC 2?
...
What is the best way to organize a MVC2 web project (as complex as stackoverflow)?
should i have everything in one project?
if not, how should i separate the projects and folders?
...
Hello,
I was trying Ninject in a Asp.net Mvc application and I was wondering what the best practice is for using Ninject if you have more than 1 project in your solution.
I guess all projects need some kind of Loader which you initialize in the global.asax?
Kind regards,
Pickels
...
Greetings friends,
I am developing a web application that will allow the customer to enter a personalized message, which will then be converted to HTML. Well, the problem is that I can not allow the insertion of Javascript code. So I need a method that filters the text, searching for and remove it. I think the regular expressions to so...
I'm trying to change the method OnAuthorization, so that it is available for any application ... this way:
public partial class Controller
{
protected override void OnAuthorization(AuthorizationContext filterContext)
{
if ((string)(filterContext.RouteData.Values["action"]) == "test")
{
filterContext.R...