Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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??
Posted
Comments
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...

1 solution

Steps :
1. fetch value from database and put them on a Object (say Employee object)
2. Using jsp tag you can set this value
Java
<jsp:usebean ...="" xmlns:jsp="#unknown" />
<jsp:setproperty ..="" xmlns:jsp="#unknown" />


Or
2. You can use jstl to set this value(preferred way)
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900