如何将create user的数据从视图传递到控制器 [英] How can I pass data of create user from view to controller

查看:82
本文介绍了如何将create user的数据从视图传递到控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为用户注册的视图,单击保存按钮将表单数据传递给名为Create的控制器操作。在这种情况下,我不想使用模型和jquery。模型属性可以由类库使用,类库是主项目中的独立项目。所以我请帮帮我。



我尝试过的事情:



PAMS-Main

项目1. PAMS级库

项目2. PAMSExt-MVC架构

i have view named "user registration", on click of save button pass the form data to controller action named "Create". In this context i doesn't want to use of model and jquery. model properties can be used by class library which is separate project in the main project. so i please help me out from this.

What I have tried:

PAMS-Main
Project 1. PAMS-Class Library
Project 2. PAMSExt-MVC architecture

推荐答案

是的,你可以做。



你刚刚将你的应用程序分开了不同的项目。在这里,您的模型/实体位于不同的项目(类库)中。在不同的项目中分离你的实体模型是一个很好的做法,你可以在你的应用程序中添加对其他项目的引用。

这里,对于你的应用程序,你只需要添加PAMS类库的引用你的MVC Appliation。
Yes you can do.

You just separated your application different project. Here your model/Entity is in different project (class library). Its a good practice to separate your entity model in different project by which u can add reference to other project in you application.
Here, for you application you just need to add the reference of PAMS class library to your MVC Appliation.


这篇关于如何将create user的数据从视图传递到控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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