In an ASP.NET MVC application, what do you do when you have unique classes that aren't controllers, helpers or view-models?
For example, say you have a class of utilities that are useful for processing map/location data.
These utilities may be used by more than one controller.
Would you create a top-level folder/namespace for them and...
When the file name is "Algunas MARCAS que nos acompañan" ASP.NET MVC raise an System.FormatExceptin when I try to download that file. But if the file name is "Asistente de Gerencia Comercial" it doesn't.
I guess this is because something related to UTF-8 encoding, but I don't know how to encode that string.
If I'm right, how can I enc...
Is it possible to do something like this in an ASP.NET MVC controller?
public ActionResult Index(CustomADT adt)
{
...
}
And you will pass in a class from another controller when you click on a link. Or is it only possible to pass around strings?
Edit:
A bit more elaboration. Let's say I have the following class hierarchy:
publi...
Hi all,
I have a view that looks somewhat similar to this
<% using (Html.BeginForm()) {%>
<%= Html.DropDownList("Category") %>
<%= Html.DropDownList("SubCategory") %>
<input type="submit" value="Print" />
<%= Html.ActionLink("Cancel", "Index") %>
<% } %>
I was wondering if anyone knew how i could load the subcategory...
Hi folks,
I've got some custom error handling in my ASP.NET MVC site -> seems to be working fine.
I have an Error Controller, like this :-
/Controller/ErrorController.cs
[AcceptVerbs(HttpVerbs.Get)]
public ActionResult Unknown()
{
Response.StatusCode = (int)HttpStatusCode.InternalServerError;
return View("Error");
}
[AcceptV...
Hi,
I've been trying to get membership working in ASP.NET MVC. There are some pages that require authentication. Others that can have guests and authorised members. Much like StackOverflow. They can do things anonymously or as a registered user.
We also have a custom database schema of handling members (not the default ASP.NET Membersh...
I am getting the following error on one of our production servers. Not sure why it is working on the DEV server?
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Erro...
Hi ,
Am using strongly typed view to show a complex object in a data entry/edit form. for eg: Model.UserInformation.Name, Model.LivingPlace.FacilitiesSelectList, Model.Education.DegreesList... etc. These information are shown in multiselect listbox, grids.. etc. User can change the information in the edit screen. Is there any way to po...
What I want to achieve essentially is:
Items assigned to me
Item 1 assigned to me
Item 2 assigned to me
Item 3 assigned to me
All open items
Item 1 open to everyone
Item 2 open to everyone
Item 3 open to everyone
Item 4 open to everyone
Though from what I have experienced of MVC so far is that I would have to return the data to the...
Hi,
I'm starting to develop in ASP.NET and I can't find any example of a very simple use-case:
I've got some model objects displayed on a view.
I added a checkbox so that the user can choose the one he/she wants to see.
Then the user clicks on a link and he/she should see the model objects he/she selected displayed in another view.
1...
Is there a way to auto-log a user in who is logged into active-directory without propmting them to use the login dialog.
I cannot set the Auth method to windows as there are 5 differant login methods.
Thanks
...
I would like to add integrated windows security to one of my views, is this possible?
On web-forms I would just find the file in IIS and add the file security features there, obv MVC being non-file based this doesnt seem to work.
The site is using Forms Auth - Trying to make this work for MVC http://beensoft.blogspot.com/2008/06/mixing...
Hello, how should i load the table "Setting" into an asp.net mvc so that i can use it as a reference setting for the whole application.
Is there anyway to save the memory and usage to do this problem? In my understanding, if i have settings in database, i will have to make the program load the table into a variable, then call out. But i...
I need to use few of the ajax control toolkit in asp.net mvc
say, Validator CallOut,ModalPopUp.
and even i need to put a gridview in an update panel?
can anybody give any valuable link so that i can look into it?
...
I'm developing a framework application, and I want individual implementations to have the possibility to add new functionality simply. For controllers this is easy, just compile it and drop it in the bin directory, but what about views? Is it possible to embed a view as a resource in a class library or something? How?
...
I have gallery in my project. I save images on the hard drive but tags, descriptions, etc. I save to the database.
Working with the database and data validation going through the service layer.
Since the user has remove the image, the files will be removed from the hard drive and the record will be removed from database.
//Action
publ...
How to call or make the javascript function from the Application_Start of global.asax in asp.net mvc(C#) application?
...
I have an existing WebForms project to which I'm adding MVC pages. I created an MVC project and copied the project type guids.
It works fine, but I can't get Visual Studio to display the "Add Controller" or "Add View" wizards on my controllers and views directories (they're not /Controllers and /Views, they're in /Foo/Controllers and /F...
I compiled an ASP .NET MVC project and received all sorts of weird errors.
After investigation I found that when I looked at the assembly with Reflector, it showed me an error ‘Invalid COFF header’.
What can the possible cause be as the assemblies are essentially corrupt and do not work at all.
Any ideas what could cause this?
...
i created a new solution and it builds fine targeting framework 4.0 but when i run it, my browser comes up saying:
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following U...