使用成员资格向asp.net注册用户 [英] register user with asp.net using membership

查看:83
本文介绍了使用成员资格向asp.net注册用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过使用成员资格的asp.net进行编码来注册用户
用户具有用户名,密码,名称,年龄,性别,地址,城市,联系电话..etc属性
我不想为此使用任何向导
请告诉我如何使用编码

i want to register user by coding with asp.net using membership
user has username,password,name,age,sex,address,city,contactnumber ..etc attributes
i dont want to use any wizard for this
please tell me how to do this with coding

推荐答案

希望 ^ ]可能会为您提供帮助.
Hope this[^] might help you.


如果要自定义所有内容,可以手动执行.

1.创建所需的控件(例如,用于用户输入的文本框,然后标记控件以显示信息).

2.将验证器控件添加到那些必填的输入中,并在用户尝试跳过输入数据的情况下显示自定义消息.

3.在页面上有一个按钮,例如提交".使用该按钮的事件处理程序可以包括其他验证和其他内容.

4.如果一切正常,则提取输入的数据.

5.使用ADO .NET并连接到数据库中的表(SQL Server左右),然后输入详细信息作为记录.

6.下次用户登录时,在数据库中查询名称和密码(甚至需要的其他属性),对其进行验证并继续登录.

希望这可以帮助. :)
You can do this manually if you want to customize everything.

1. Create the controls required (For example Textboxes for user input and then label controls to display information).

2. Add validator controls to those inputs which are mandatory and display a custom message in case the user tries to skip entering data.

3. Have a button in the page like "Submit". Use that button''s event handler to include extra validations and other stuff.

4. If everything is fine then extract the entered data.

5. Use ADO .NET and connect to a table in a database(SQL Server or so) and enter the details as a record.

6. Next time when the user logs in, query the database for the name and password (or even extra attributes which you need), validate it and continue login.

Hope this helps. :)


这篇关于使用成员资格向asp.net注册用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆