In our website, we add a log whenever a user logs in. Now we add the log just before it goes to the home page. But, suppose when the user is not logged in and try to hit any url other than the home page or default page. At that case the ReturnUrl is that page in login page. So, after the login it goes to the requested page instead of hom...
I am using ASP MVC to develop a new project. I am using the repository pattern for Data Access. I have worked on the same scenario before using SQL Server, but now I'm using MySQL.
How do I interact with MySQL using the repository pattern?
...
I have a simple MVC site but I need to add in some static HTML pages, I have tried to add an IgnoreRoute in for .html files but this didn't work.
...
I would like to create a HTML helper that works the same as Html.RenderPartial except I would like the partial to be rendered from ViewData or a model object and not a file on the filesystem.
example:
<% Html.RenderVirtualPartial("Name", Model.MyPartialContent") %>
I can return string in my helper but i need to have code tags (i...
Hello,
I have this very strange problem.
Currently I'm using ASP.NET MVC Ajax Ajax.BeginForm helper.
After it creates successful post request to server and receives response my other components that use ajax, are not able to request anything from server (Firebug just does not display any requests, at the same in another browser window...
Hello, i have this problem... i have an ASP.NET MVC application locally and i have in one server another application in asp, i need to add the mvc application to the asp application. So i have "http://www.aspApp.com/mvcApp" but i cant work with the mvc application, when i call for example /Controller.aspx/Action, it throws a 404 error, a...
I am trying to unit test the code I got from an DotNetOpenAuth example but I have a hard time getting the UrlHelper to work in my tests.
Somewhere on the LogOn ActionResult on my controller it calls the following UrlHelper. The following example is a simplified version of that ActionResult.
public ActionResult TestUrlHelper()
{
var...
Regarding separations of concerns only, are there advantages of using ASP.NET MVC instead of ASP.NET webforms for a multi tier application with an user Interface layer, a Business Logic layer and a Data Access layer?
...
This question is not about which is the best, it is about which makes the most business sense to use as a company's platform of choice for ongoing freelance development.
I'm currently trying to decide what framework to move my company in regarding frameworks for web application work.
Options are
ASP.NET MVC
Django
CakePHP/Symfony etc...
I'm developing a web application using ASP .NET MVC 1.0 and jQuery (including the validation plugin). The server-side markup for a typical "edit entity" view is as follows
<label for="FirstName">FirstName:</label>
<%= Html.TextBox("FirstName", Model.FirstName) %>
<%= Html.ValidationMessage("FirstName") %>
When invalid data is posted t...
the users on a website need to have the possibility to buy/sell website's currency (credits in exchange for real money), is there some easy to use API to do this (that is usable in asp.net mvc) ?
the user can:
buy website's currency for real money
and get real money for website's currency
is this possible with paypal ?
...
In my Asp.net MVC 1.0 application I want to use CKEditor as my Rich Text Editor. But if I want to use this editor i have to Disable Request Validation . After doing this if I want to display the whole html content directly I can't use HTML.Encode() becuase I want to render the real html content generated from Editor.
So how can we prev...
I need to have a login area with the ability to add users to groups in my project.
The built in membership account that come with MVC is just what I need, although I've seen on blogs that some people warn against using the built in system and that you should delete it.
I'm new to mvc and .net so the likely hood of me writing something ...
I'm trying to unit test my routes using the MvcContrib.TestHelper ShouldMapTo<TController>() extension method, but my tests fail with the following error message:
failed: Method MvcContrib.TestHelper.RouteTestingExtensions.ShouldMapTo:
type argument 'ReviewController' violates the constraint of type parameter
'TController'.
But Review...
I need to store a file, such that my ASP.Net MVC app can access the file, both when I run the website in visual studio, and when the production server is actually running. I don't think that I can do relative pathing on my dev box, because the execution path is something in the System32 folder. I don't know if the same is true on the ser...
Obviously, the typical WebForms approach won't work. How does one track a user in an MVC world?
...
I have been trying to find some step by step guidance on how to take a user's inputs (e.g.) name address, etc) via the view, to write that to xml, and then to submit that set of data to a third party interface (e.g UK Companies house xml gateway)
I have some aspects in hand (i.e. GET side of view to collect the data), but can't seem to ...
As far as I know the System.ComponentModel.DataAnnotations.DataTypeAttribute not works in model validation in MVC v1. For example,
public class Model
{
[DataType("EmailAddress")]
public string Email {get; set;}
}
In the codes above, the Email property will not be validated in MVC v1. Is it working in MVC v2?
Thanks in advance.
...
In my ASP.NET MVC application, I have the following setup:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;extras"/>
I have referenced assemblies located in the extras folder in the views and they have worked perfectly (using <%@ Import Namespace="myNameSpace" %>).
My questio...
This must be simple, but I can't seem to figure it out. I am setting an action parameter inside an action filter as follows:
public class MyFilter : ActionFilterAttribute
{
public override void OnActionExecuting (ActionExecutingContext filterContext)
{
filterContext.ActionParameters["MyParam"] = "MyValue";
}
}
I a...