将数据库值转换为html表单文本框 [英] Getting Database values into a html form text-boxes
本文介绍了将数据库值转换为html表单文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用SQL Server数据库,我有一个带有许多文本框的HTML表单。现在我想将这些数据库值放入我的文本框中。我怎样才能实现呢?
I am using SQL Server Database and I have a HTML form with many text-boxes. Now I want to get these database values into my text-boxes. How can I achieve it??
推荐答案
步骤:
1.从数据库中获取值并将它们放在一个Object上(比如说Employee对象) )
2.使用jsp标签你可以设置这个值
Steps :
1. fetch value from database and put them on a Object (say Employee object)
2. Using jsp tag you can set this value
<jsp:usebean ...="" xmlns:jsp="#unknown" />
<jsp:setproperty ..="" xmlns:jsp="#unknown" />
或
2.您可以使用jstl设置此值(首选方式)
Or
2. You can use jstl to set this value(preferred way)
这篇关于将数据库值转换为html表单文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文