Wednesday, January 4, 2012

How to delete a user from ASP.NET membership database by SQL?

   DECLARE @UserId uniqueidentifier

   SET @UserId = 'userid in here F6817A3F-D0AF-4715-8A5C-4750E2C9EA2D'
   
   DELETE FROM aspnet_Profile WHERE UserID = @UserId

   DELETE FROM aspnet_UsersInRoles WHERE UserID = @UserId

   DELETE FROM aspnet_PersonalizationPerUser WHERE UserID = @UserId

   DELETE FROM dbo.aspnet_Membership WHERE UserID = @UserId

   DELETE FROM aspnet_users WHERE UserID = @UserId


Eight Ways to Transfer Data from One Page to Another Page in ASP.NET webform

http://www.eggheadcafe.com/tutorials/asp-net/e653f028-01fb-4d0e-843b-058deae562a2/eight-different-ways-to-transfer-data-from-one-page-to-another-page.aspx
1. Use the querystring:

2. Use HTTP POST:

3. Use Session State:

4.  Use public properties:

5. Use PreviousPage Control Info:

6. Use HttpContext Items Collection:

7. Use Cookies:

8. Use Cache:


Tuesday, January 3, 2012

What is partial view in ASP.NET MVC 3?

Create reusable content with Razor syntax, like user control in ASP.NET web form.



How to open a new window or tab in ActionLink

@Html.ActionLink(”New window”, "test", "Home", new { target = "_blank" })

Or use html A link directly.