Hello,
I would like to support many languages in an MVC project. I did it already using WebForms.
I used LocalizedPage class inherited from Page. In MVC I am inheriting LocalizedPage from a System.Web.MVC.ViewPage,
public class LocalizedPage : System.Web.Mvc.ViewPage
and then my model uses it like this:
public class OverviewModel ...
I want my login page to be SSL only:
[RequireHttps]
public ActionResult Login()
{
if (Helper.LoggedIn)
{
Response.Redirect("/account/stats");
}
return View();
}
But obviously it doesn't work on localhost when I develop and debug my application. I don't wanna use IIS 7 with S...
If I look at the Razor View Engine, then I see a very nice and concise syntax that is not particularly tied to generating html. So I wonder, how easy would it be to use the engine outside asp.net in a "normal" .net environment for example to generate text, code,...
Any pointer, example, comment or explanation is welcome.
...
Dear All,
I am taking over quite a big ASP.NET MVC project, and I am just trying to make it work on my computer. It is asp.net MVC 1 project and I will continue developing in with Visual Studio 2010. I have set up the database and everything however I have a strange problem and no clue why it happens:
the project uses strongly typed v...
Hi there,
I having a situation with my VS2010, while using MVC, and I would like to know if anyone have the same situation.
My VS2010 don't check if class defined in ASPX pages header exists, or class property in ASPX during compilation.
Best regards
...
So I get thrown an exception right when I try to create a new instance of my Web Service that says:
"Could not find default endpoint element that references contract 'KBBVehicleService.IVehicleInformationService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application,...
This is a noob question, but I will ask it anyway...
I'm wanting to create a page that will do basic CRUD operations on a list of items:
-display the list
-edit an item
-create an item
-delete an item
It is looking like I will need an action for each of this operations. This is good and understandable. My question is regarding the vi...
I'm letting users choose their preferred language setting for number, currency and date formats. I've got this implemented in a filter to set the Current(UI)Culture. Now I want to use that culture information on the client to setup jQuery's datepicker.
What would be the most efficient way of getting the configured culture setting to the...
With ASP.NET WebForms it is possible to set the session state mode in the page directive:
<%@ Page EnableSessionState="true|false|ReadOnly" %>
Is the same configuration also possible in ASP.NET MVC (e.g. per controller or per action) and if so, how?
(In other words: can I disable or set to read-only session state per controllers/acti...
Probably this has been asked so many times before but i can't find answer any where.
I have a Action
public ActionResult SearchResult()
{
return View();
}
Now i need some data as well which is related to View, so i am trying to do following
public JsonResult SearchResult()
{
var result = new JsonResult();
result.Data = new...
This is very strange and I don't know why. I have a ViewModel that return some value for my object, when rendering it, they have different values, yet, they points to the same property:
<%: Model.myProperty %>
That returns "25", which is what I've set the property to be. But when rendered it as an textbox, it returned "0" as the value...
Hi, I have a problem using ASP MVC with C#. When I create an aspx page with a strongly typed inherit I received the following error:
Server Error in '/' Application.
Illegal characters in path.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more informatio...
Hello!
Is there anyway to make all actions in a given controller to redirect to the server root?
For example, if I have a URL with controller Home and action terms I want that to the URL to become /terms
If I have another URL with controller Home and action privacy, then the URL should become /privacy.
I am able to do this by hard-co...
I'm trying to implement a Widget control that exists on every page in the system, which will allow the user to have basic Search & Directory functionality available on each page. This is a tab control defined below, where in the <ul> the currently selected tab is determined by the the value in Model.CurrentTab and the corresponding conte...
Is there a name for the software design pattern that involves MVC with domain models and view models? It's the pattern used when a tool like AutoMapper is employed.
I was attempting to explain the advantages of such a design to some fellow programmers and was calling it MVVM but I'm now of the opinion that's not right and the MVVM patte...
I have a button that adds a new row to the view with the following code. Is there a way to increment the label? What I would like is to say "Name 1:" "Name 2:" for every row.
string s = "<table>\r\n";
s += " <tr>\r\n";
s += " <td>\r\n";
s += " <label>Name: </label>";
s += " <input></input>";
s += " </td>\r\n";
s +...
I have a button which right now is set as a type "submit". This calls the controller, execute some code and returns back to the view. When I use jquery to hide the button, I see that when I click on the button, what I have hides the button but as soon as the view is returned, the button is not hidden no more. Whereas with type "button", ...
Hi,
I'm new to MVC and even though there is a lot (and I do mean a lot) of information out there that is very useful - it's proofing very difficult to get a clear understanding on how to achieve my exact requirements with MVC 2.0.
I would like to set up a solution as follows:
Provide a web UI using an MVC 2.0 project.
Use Linq to SQL ...
Hello, I beginning a new project and I need to create a Project for implementing Entity Framework 4.0 and Unity Framework 2.0 along with Enterprise Library 5.0.
I am very new to Entity Framework and Unity Framework and getting confused in how I can get normal Object BO's and DAL with Database.
Can someone point me to some simple exampl...
I have a public page that is not supposed be possible for users to sign into. So I have a url that there is no link to and you have to enter manually and then sign in.
The url is multilanguage however, so it can be "/SV/Account/Logon" or "/EN/Account/Logon" etc etc. Can I disable this url to be indexed for all languages?
...