Speaking Wednesday May 20th, 6:30PM, Microsoft Office San Francisco on ExtJS and ASP.NET Membership!
(Using Membership ObjectDataSource From MSDN Article) I'm doing a project where I have lots of DropDownList's on a page and want a simple way to set the initial values based on some known value. The DropDownLists are retrieved using ObjectDataSource but I don't want the first value displayed. I wrestled some with how to do this using page_load or page_prerender but didn't come up with good solutions. I did finally decide that programming the databound event of the dropdownlist was probably the best way to go. The solution is pasted below. The MembershipUtilities.MembershipODS c# code can be downloaded from MSDN or on my web site at the following location. … Continue Reading
If you ever have wanted to be able to programmatically change (reset) a users password while at the same time continuing to be able to use the question and answer feature, this post is for you. The problem is that if you use code like this: string username = "user"; string password = "pass@word"; MembershipUser mu = Membership.GetUser(username); mu.ChangePassword(mu.ResetPassword(), password); You will find that if you have in your web.config requiresQuestionAnswer="true", you will get an error when you try and reset the password. The elegant solution to this is to create an additional membeship tag in your web.config and reference it when you change passwords. That is, add … Continue Reading
Introduction A question that frequently comes up in the asp.net forums is how to have a gridview show the the last record added highlighted. This articles gives a technique for doing this. It only works with SqlServer but could could be modified for other databases. What It Looks Like Running After pressing the insert button on the screen shot below, the bottom line was actually added and it is automatically highlighted. This is in a nutshell, what the code listed below and this article discusses. … Continue Reading