I need to update existing users IsApproved status in the aspnet_Membership table. I have the code below that does not seem to be working. The user.IsApproved property is updated but it is not saving it to the database table. Are there any additional calls I need to make? Any suggestions? Thanks.
/// <summary>
/// Updates a user...
What is wrong with the following code: I`m having the error message
Error 1 ; expected
<%if (Model.ReferenceFields != null)
{%>
<%int count = 1; %>
<%foreach (var referenceName in Model.ReferenceFields)
{%>
<%var value = "value"; %>
<%count++; %>
...
Hi All,
I have a simple test page with a single styled button. I'm using a:hover when you hover over the button. However, when you click the button the a:hover style remains until I click on something else. How would I fix this and why is this happening?
Thanks,
rod.
<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" ru...
Hi,
I have a usercontrol that is rendering a list of items. Each row contains a unique id in a hidden field, a text and a delete button. When clicking on the delete button I use jquery ajax to call the controller method DeleteCA (seen below). DeleteCA returns a new list of items that replaces the old list.
[HttpPost]
public PartialView...
i am using ASP.NET MVC and EF and in my controller i am using something like this:
public ActionResult Index()
{
using (MyEntities db = new MyEntities())
{
var _info = db.INFORMATION;
return View(_info);
}
}
and it throws me the below error. (if i use...
Why does my html helper extension work if I do:
<%= Html.MyExt() %>
all mvc helpers work like:
<% Html.TextBox(""); %>
My extension builds a StringBuilder, then returns a string.
...
I'm trying out ASP.NET MVC 2 by going through the "NerdDinner" tutorial. But apparently version 2 of MVC doesn't create a Details page the same as in the tutorial, and you get divs with css classes on them to style. However, I want to get the style where each label is followed on the same line with the field, and I can't do it, I get the...
I have an application that taps into BeginRequest and EndRequest to set up and tear down NHibernate sessions like this:
BeginRequest += delegate
{
CurrentSessionContext.Bind(SessionFactory.OpenSession());
};
EndRequest += delegate
{
var session = CurrentSessionContext.Unbind(SessionFactory);
session.Dispose();
Containe...
Hi
I want to develop an ASP.Net MVC application with EF4 Model First design and only generate the actual database much later, ideally at the end of the project.
Based on some of the ideas here:
http://elegantcode.com/2009/12/15/entity-framework-ef4-generic-repository-and-unit-of-work-prototype/
I want to create something like an ...
Right now, I'm trying to work around an IE6/7 bug which requires the wrapping of the </a> closing tag with this IE specific comment to make some drop-down menu work:
<!--[if IE 7]><!--></a><!--<![endif]-->
Unfortunately, I cannot inject this directly into my View page code like this:
<%= Html.ActionLink("LinkName<!--[if IE 7]><!--></...
I have a problem that seems like there should be a simple solution but haven't found it yet.
I have a pretty simple form that calls an action and passes it a FormCollection via HTTP Post.
The form works perfectly until I introduce < or > into the field. Then I end up on a blank page having skipped the Action altogether.
Need more inf...
Hi,
I am pretty new to MVC. I have my first Ajax Form here:
<div id="test"></div>
<div id="MainChatMenu">
<% using (Ajax.BeginForm("SendMessage", "MainChat", new AjaxOptions { UpdateTargetId="test"}))
{ %>
<input id="chatMessageText" type="text" maxlength="200" />
<input type="submit" value="Go"/>
<% } %>
Now, if I click the sub...
Hi there, quick question...
How can I best create internal links? This is the markup I want to achieve:
<h3>Title</h3>
<ul>
<li><a href="#prod1">Product 1</li>
<li><a href="#prod2">Product 2</li>
<li><a href="#prod3">Product 3</li>
...
<li><a href="#prod100">Product 100</li>
</ul>
<div id="prod1">
<!-- content here -->
</d...
I'm following Phil's great tutorial on model binding to a list.
I use input names like this:
book[5804].title
book[5804].author
book[1234].title
book[1234].author
This works well and the data gets back to the model just fine, populating a list of books.
What I'm looking for is a way to get access in the model to the index that was u...
I have two different user controls both of which has a textbox with the ID: txtEmail. When I render both controls in MVC, I'm running into conflicting IDs. Does anyone have any suggestions to resolve this issue?
...
Hi
I starting too look at a bit of security into my site. My site I would consider a very low security risk as it has really no personal information from the user other than email.
However the security risk will go up a bit as I am partnering with a company and the initial password for this companies users will be the same password the...
I have a webapplication that heavily uses JQuery. I would like to start using silverlight in its place if its possible. Instead of using jquery ajax features and other jquery features I would like to use silverlight. is this possible to do with silverlight?
...
In my ASP.NET MVC site, part of a feature allows the user to enter the hours when a certain venue is open.
I've decided to store these hours in a VenueHours table in my database, with a FK-to-PK relationship to a Venues table, as well as DayOfWeek, OpeningTime, and ClosingTime parameters.
In my View, I want to allow the user to only in...
I'm trying to devise a method of doing VERY simple asp.net mvc plugins but mostly I'm trying to understand how view rendering works.
I've distilled my problem down to this
public class CustomView : IView
{
public void Render(ViewContext viewContext, TextWriter writer)
{
writer.Write( /* string to render */);
}
}
N...
I've been tasked with adding a website builder to our suite of applications. Most of our clients are non technical small business owners (brick and mortar stores, mom and pop shops). I've been told that I should be looking at Blogger Template Editor and trying to see if I can make something that fully featured and easy to use. The idea b...