Click here to Skip to main content
14,384,168 members
Rate this:
Please Sign up or sign in to vote.
See more:
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??
Shubhashish_Mandal 8-Jul-13 2:48am
Lots of information are missing. What technology you are using. Did you use any framework.?
K3pura 8-Jul-13 2:51am
I am Using Servlet and JSP.
AlphaDeltaTheta 8-Jul-13 2:53am
ASP.NET? Java? Which frame work
AlphaDeltaTheta 8-Jul-13 2:56am
Start with setting up a JDBC:ODBC connection. Get the values of the textboxes from the submit request and save it to the database.
K3pura 8-Jul-13 3:12am
I know how to make the connection. Bot My Question is how to display the database values in text boxes not storing the text box values into database...
AlphaDeltaTheta 8-Jul-13 3:22am
Get the values, set it the value of the text boxes <input value="+value+"> Where value is a value retrieved from the database

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

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. You can use jstl to set this value(preferred way)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100