简体   繁体   English

帐户控制器MVC2

[英]Account controller mvc2

我想修改帐户控制器,在我要注册的用户名中添加一些字段是useraddress contactno和panno,以便将用户名,密码,Emailid存储在帐户表中,并将数据userAddress,contactno,userName Emailid,panno存储在我们的表中控制器存储两个表值同时显示。用户名和emailid分别存储表account和userdetails表我在帐户控制器和存储库plz中编写的代码可以帮助我

You should be able to do the following... 您应该能够执行以下操作...

1) In your model (ModifyAccountModel with a bit of luck) add the new fields 1)在模型(ModifyAccountModel有点运气)中添加新字段

2) In your controller, you will need to change the code that populates the model with the existing account data 2)在您的控制器中,您需要更改使用现有帐户数据填充模型的代码

3) In your view, you will need to add form elements to display the data to be edited. 3)在您的视图中,您将需要添加表单元素以显示要编辑的数据。

4) When the form is submitted, the ModifyAccountModel will pick up the new values from the form, so you will just need to ensure that whatever you use to persist this data will take those fields and store them. 4)提交表单后,ModifyAccountModel将从表单中获取新值,因此您只需要确保用于保存此数据的任何内容都将使用这些字段并进行存储。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM