I want to implement membership where email is used as the user id. Is there a ready-made provider for this, or do I have to write my own one? Or should I just make do with the 'default' one?
...
hi
i need convert date to shamsi date
i create a method that convert DateTime to shamsi Date.
when i passing a date to the method i got this error
The best overloaded method match for 'BentaAccounting.Classes.GenralClasses.FarsiDate.MiladiToShamsi(System.DateTime)' has some invalid arguments
this is the code i am using
the method
...
I have a View where I can upload an image and the image is also displayed in there like this:
//ResourceStorage is a virtual directory that indicates to the pictures storage location
<img src='<%=Url.Content("~/ResourceStorage/Profile/pic.jpg") %>' alt='pic' />
after I upload the picture, on the hard drive I get the new "pic.jpg...
My Html action link takes me to a view where i can see the details..
For Ex:http://localhost:1985/Materials/Details/4
But it shows error,
The model item passed into the dictionary is of type
'System.Data.Linq.DataQuery`1[CrMVC.Models.ConstructionRepository+Materials]'
but this dictionary requires a model item of type
'CrMVC.Models.C...
Hi,
on ScottGu's Blog is an Example how to use MVC2 Custom Validation with EF4:
http://weblogs.asp.net/scottgu/archive/2010/01/15/asp-net-mvc-2-model-validation.aspx
So here the Problem:
When the Designer in VS2010 creates the Objects for the DB, along to the example you have to add [MetadataType(typeof(Person_validation))] Annotation ...
Okay i'm a little bit stuck on how to solve this problem.
When a user registers. I want to send him a link so that he can verify hes email address.
But i have troubles generating the link.
I've already written the controller to accept the links with the correct keys. i only have no idea on how to generate the activation keys.
So wh...
I'm implementing StructureMap in a multi-tenant ASP.NET MVC application to inject instances of my tenant repositories that retrieve data based on an ITenantContext interface. The Tenant in question is determined from RouteData in a base controller's OnActionExecuting.
How do I tell StructureMap to construct TenantContext(tenantID); wher...
I'm adding the Roles provider to the built in AccountModel but having some problems adding GetAllRoles in my view using the Register View Model.
View Model from AccountModel
public class RegisterModel
{
UserName, Email Etc....
[Required]
[DisplayName("AllRoles")]
public SelectList AllRoles { get; se...
Hi,
Has anyone been able to get AutofacControllerFactory working in applications where the controllers are split into Areas?
Looks like it is not supported out of the box in the current version.
Thanks
...
Hi all,
I've recently created an ASP.NET MVC 2 application, which works perfectly in the development environment. However, when I deploy it to the server (123-reg Premium Hosting), I can access all of the expected areas - except the Account controller (www.host.info/Account). This then attempts to redirect to the Error.aspx page (www.ho...
Hi, using ASP.NET MVC 1.0 and I have a action that returns a JsonResult and I need to redirect another action that also returns a JsonResult action type.
The problem is the RedirectToAction() returns a RedirectToRouteResult class and seems there is no way to convert that to JsonResult class ?
This is the error I am getting;
Error 124 C...
I am following a tutorial and have the same scenario except I'm not using ASP.NET but MVC 2 instead. I am using VS 2010, adding a Silverlight 4 project to my existing app. I need to add a domain service class but there is no option for it in this MVC APP. What do I need to use?
...
Hello,
I have a controller that is being called twice from an ActionLink call.
My home page has a link, that when clicked calls the Index method on the Play controller. An id of 100 is passed into the method. I think this is what is causing the issue. More on this below.
Here are some code snippets:
Home page:
<%= Html.ActionLink(“...
I'm looking at the partialview components of the MVC Framework.
i want my partial view to be handled in its own action and for the rest of the view to handle itself, but i'm getting an exception because the main page is not getting its view fired.
Am i going around this the wrong way?
My Main View (Jobs/Index.aspx):
<%@ Page Title=""...
I'm writing a forum in ASP.NET. I have a table of posts. How can I assign a post to a user? If I had a normal User table, I'd just creating a new field in the post table "UserId" and creating an assocation in the Linq to Sql designer. But now? Should I include the aspnet_Users in the designer?
Thanks.
...
What is the ultimate workaround?)
Desired scenarios are:
Multistep forms.
If a page has tabs on it, the tabs should persist their `viewstate'
Whatever navigation user has chosen, it shouldn't affect (more appropriately, bother) the conversational state management.
Those are just several aspects, but I find them much practically rele...
In my controller I have this:
ViewData["maskList"] = new SelectList(equipmentRepository.GetMasks(), "Id", "DisplayName");
and then I bind it to my view using
<div each="var nfa in mfa.NasalFittingAssessment">
${Html.DropDownList("NasalMaskTypeId", ViewData["maskList"] as IEnumerable<System.Web.Mvc.SelectListItem>, new { class = "...
I want to use checkbox in my detail view for the bit true or false field. How would i do that .
EDIT
public ActionResult Details(int id)
{
Groups group = _db.Groups.First(c => c.int_GroupId == id);
var checkBox = Request.Form["bit_Active"];
if (checkBox == "on")
{
}
return View(group);
}
View:
<input type=...
I'm a little confused here, I am trying use a partial view in a for each loop like so
<% foreach (var item in (IEnumerable<MVCLD.Models.Article>)ViewData["LatestWebsites"]){%>
<% Html.RenderPartial("articlelisttemaple", item); %>
<% } %>
And my partial view looks like this
<div class="listingholders">
...
I have an ASP.NET MVC web application that implements a custom membership provider. The custom membership provider takes a UserRepository to its constructor that provides an interface between the membership provider and NHibernate. The UserRepository is provided by the Ninject IoC container.
Obviously, however, this doesn't work whe...