当我按下添加按钮事件时,如何处理带有某些字段的用户控件. [英] How to handle an user control with some fields and when I press add button event.

查看:65
本文介绍了当我按下添加按钮事件时,如何处理带有某些字段的用户控件.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个带有某些字段的用户控件,当我按下添加按钮时,它会使用空白字段生成相同的用户控件,它会动态生成,另一个按钮是提交",当我将其保存时,所有数据都保存在数据库到服务器.我的查询是如何在不命中服务器的情况下重复该用户控件.给定n次输入后,当我按下Submit按钮时,它将所有数据保存在数据库中.

I am creating an user control with some fields and when I press add button It''s generate same user control with blank field, It''s generate dynamically and another button is Submit, When I press it all data save in Database to the server. My query is how can I repeat that user control without hit server. After given n number of input when i press submit button then It''s save all data in database.

推荐答案

我想在客户端处理此问题

I want to handle this at client Side



你不能.特别是,客户端没有数据库-它在服务器端.您可以使用type="submit"按钮使用"POST"方法创建表单.无论使用什么,您都只能使用服务器端脚本或技术在服务器端处理发布的数据:ASP.NET,PHP,带有WSGI的Python等.此服务器端代码应解析/分析已发布的数据,并将其添加到您的数据库中.

—SA



You cannot. In particular, there is no a database in client side — it is on your server side. You can create a form with the method "POST" with the button of the type="submit". You can process the posted data only on your server side using server-side scripting or technology, whatever it is: ASP.NET, PHP, Python with WSGI and the like. This server-side code should parse/analyse posted data and add it to your database.

—SA


这篇关于当我按下添加按钮事件时,如何处理带有某些字段的用户控件.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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