alexfog Posted April 13, 2007 Share Posted April 13, 2007 Hi all,I'm very new with ASP and my English is bad, I thought I could ask for some help I'm using the ADO demo - List, Edit, Update, and Delete Database Records, it is working very good.I’m this code I’m getting an auto table with field names and values that I can edit and change.I need to have 3 fields that I can select from a drop down menu and 2 fields with few rows of text era.Somebody here could tell me please what to do in order to change fields to textboxes or to selection when I retrieve information automatically?I really don't know how to do it. Can somebody help me with some examples?<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%><%ID_no=Request.Form("ID_no")if ID_no="" then response.endset conn=Server.CreateObject("ADODB.Connection") conn.provider="Microsoft.Jet.OLEDB.4.0"conn.open(server.mappath("IS.mdb"))set rs = Server.CreateObject("ADODB.Recordset")rs.Open "Select * from tblIS where tblIS.[iD_no]=" & ID_no , conn%><html><head><title>ADO - Edit DataBase Record</title><link href="aa.css" rel="stylesheet" type="text/css"><style type="text/css"><!--.style1 {font-size: xx-small}--></style></head><body><h2>Edit Database Record</h2><form method="post" action="Edit_IS.asp" target="_blank"><input name="ID_no" type="hidden" value=<%=ID_no%>><table ><%for each x in rs.Fields if x.name <> "ID_no" and x.name <> "dateadded" then%> <tr> <td><%=x.name%> </td> <td><input name="<%=x.name%>" value="<%=x.value%>" size="50"></td> <%end ifnextrs.closeconn.close%></tr></table><div align="center"><br /> <input type="submit" name="action" value="Save"> <input type="submit" name="action" value="Delete"> <br> </div></form></body></html> Link to comment Share on other sites More sharing options...
pulpfiction Posted April 13, 2007 Share Posted April 13, 2007 Are you looking for something like this...http://www.asp101.com/samples/db_edit.asp Link to comment Share on other sites More sharing options...
alexfog Posted April 13, 2007 Author Share Posted April 13, 2007 thanks for your answermy first page look like this:first pagewhen you Click on a button to modify a record you get this:second pagethe second page is generated by an ASP code (the code is on my first post), i want to modify this code that some Fields are drop down and some are text erathanks for your help Link to comment Share on other sites More sharing options...
pulpfiction Posted April 13, 2007 Share Posted April 13, 2007 Textarea is pretty much straight forward....<td><textarea rows="5" cols="20"><%= x.txtAreafld %></textarea></td> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now