开发者

How to update / delete ASPNETDB.MDF 'vw_aspnet_MembershipUsers'?

开发者 https://www.devze.com 2023-01-27 14:01 出处:网络
How to update / delete ASPNETDB.MDF \'vw_aspnet_MembershipUsers\' To enable / disable the site registers users or delete users ///开发者_StackOverflow

How to update / delete ASPNETDB.MDF 'vw_aspnet_MembershipUsers'

To enable / disable the site registers users or delete users ///开发者_StackOverflow

using asp.net


for Deleting you can use:

using System.Web.Security;

Membership.DeleteUser(TextBox_username.Text);

and for updating a username you can use above cod .first delete it and then make a new one.


Note that you can't explicitly delete rows from a view (vw_aspnet_MembershipUsers), but this view is most likely based on the AspNetUsers table.

  1. Connect to the MDF file (which is probably in your App_Data folder) in Visual Studio: https://stackoverflow.com/a/173221/188926

  2. Right-click the database in Server Explorer > New Query

  3. type: delete from AspNetUsers and hit run (you may need to delete from AspNetRoles first)

0

精彩评论

暂无评论...
验证码 换一张
取 消