开发者

Getting post values of dynamically generated content

开发者 https://www.devze.com 2023-01-10 15:11 出处:网络
I have a form generator essentially, what I want to do is take the forms list of questions, dynamically generate them on the page, then开发者_运维知识库 retrieve the answers.Generating the questions i

I have a form generator essentially, what I want to do is take the forms list of questions, dynamically generate them on the page, then开发者_运维知识库 retrieve the answers. Generating the questions is easy, but how do I retrieve those answers? I don't see how I can strongly type the view, but is there a way to manually grab the post values if I know the name of the input fields?


In your controller, access the form values directly:

var value = Request.Form["inputNameHere"];
0

精彩评论

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