保存到数据库之前,应先在客户端和服务器端验证“主表单"字段的含义. [英] what is meaning of Master Form fields should be validated at both client and server side before saving into database.

查看:60
本文介绍了保存到数据库之前,应先在客户端和服务器端验证“主表单"字段的含义.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在保存到数据库之前,应先在客户端和服务器端对主表单"字段进行验证.

Master Form fields should be validated at both client and server side before saving into database.

推荐答案

这意味着您首先应在该特定表单上验证您的输入在客户端(例如通过JavaScript),然后再次在服务器上打开页面时,在服务器端(例如,使用C#代码中的特定方法)在服务器上进行验证,然后再将请求提交到数据库.

您可以通过阅读此msdn文档获取更多信息
http://msdn.microsoft.com/en-us/library/aa479045.aspx [ ^ ]

或者您可以在此处看到一些实际示例

http://www.asp.net/general/videos/how-do-i-use-validation-controls-aspnet中的 [
It means that you should first validate your input on that particular form on client side, at example via JavaScript, then again when the page is turned back on server, validate it on server side, at example in a specific method in your C# code, before committing the request on database.

You can get more information by reading this msdn document
http://msdn.microsoft.com/en-us/library/aa479045.aspx[^]

Or you can see some practical examples here

http://www.asp.net/general/videos/how-do-i-use-validation-controls-in-aspnet[^]

However both types of validation depends on the technology and platforms you are using, so you should google for more specific info.

Cheers


这篇关于保存到数据库之前,应先在客户端和服务器端验证“主表单"字段的含义.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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