Good day, I was trying to finish a small project. Everything went well but i'm kinda lost on the last part i dont know how to save the data. Can someone help me to finish my code. Here is my code : <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <% @ LANGUAGE="VBSCRIPT" %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="AUTHOR" content="Dennis Victoriano"> <title>Article Consumption</title> </head> <link rel="STYLESHEET" href="/StyleSheetIndex.css"> <body background="/images/BACKGRND.gif" bgcolor="#C0C0C0" text="#000000" link="#000080" vlink="#000080" alink="#FF0000"> <% Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open SESSION("ConnectionString"),Session("UserName"),Session("PWord") %> <!-- #include virtual="/Functions.inc" --> <h3><a href="top"></a>Article Consumption</h3> <form method="post" action="ArticleConsumption.asp" name="MyForm"> <% set Rs = conn.Execute ("Select * from viewShoeStyles where ShoeID = '" & request("ShoeID")&"'") %> <input type="hidden" name="ShoeID" value="<%= request("ShoeID") %>"> <br> <br> <b> Model Name : <%= Rs("ModelName") %></b> <br> <b>Gender : </b><%= Rs("Gender") %> <br> <b> Article # : </b><%= Rs("ShoeID") %><br> <b>Color : </b><%= Rs("Color") %> <BR> <table border="1"> <tr> <th colspan="2" align="center">Action</th> <th align="center">Component</th> <th align="center">Material Code</th> <th align="center">Material Description</th> <th align="center">Supplier</th> <th align="center">Width</th> <th align="center">Unit</th> <th align="center">M/SHT</th> <th align="center">Per Pair</th> <th align="center">Remarks</th> </tr> <% Set CompConn = Server.CreateObject("ADODB.Connection") CompConn.Open SESSION("SSV_ConnectionString"),Session("SSV_RuntimeUserName"),Session("SSV_RuntimePassword") sqlString = "Select * from viewArticleConsumption Where ShoeID = '" & request("ShoeID") sqlString = sqlString & "' order by Component" Set CompRs = CompConn.Execute (sqlString) If Not CompRs.EOF then aDetails = CompRs.GetRows iUBoundDetails = UBound(aDetails,2) CompConn.Close For i = 0 to iUBoundDetails sqlString = "?ShoeID=" & trim(aDetails(0,i)) & "&CompID=" & trim(aDetails(2,i)) Response.Write " <tr>" & vbcrlf & _ " <td align=center colspan=2><a href=ArticleComponentDelete.asp" & sqlString & ">Delete</a></td>" & vbcrlf & _ " <td><a href=ArticleComponent.asp" & sqlString & ">" & aDetails(3,i) & "</a></td>" & vbcrlf & _ " <td><a href=ArticleMaterial.asp" & sqlString & "&MatID="& trim(aDetails(4,i)) & ">" & aDetails(4,i) & "</a></td>" & vbcrlf & _ " <td>" & aDetails(5,i) & "</td>" & vbcrlf & _ " <td><a href=ArticleSupplier.asp" & sqlString & "&SupID="& trim(aDetails(6,i)) & ">" & aDetails(7,i) & "</td>" & vbcrlf & _ " <td><input type=text size=5 name=width value=" & aDetails(8,i) & "></td>" & vbcrlf & _ " <td><a href=ArticleUnit.asp" & sqlString & "&UomID="& trim(aDetails(9,i)) & ">" & aDetails(10,i) & "</a></td>" & vbcrlf & _ " <td><input type=text size=5 name=msht value=" & aDetails(11,i) & "></td>" & vbcrlf & _ " <td><input type=text size=5 name=PerPair value=" & aDetails(12,i) & "></td>" & vbcrlf & _ " <td><input type=text size=10 name=Remarks value=" & aDetails(13,i) & "></td>" & vbcrlf & _ " </tr>" & vbcrlf next end if %> <tr> <td colspan="2"><a href="ArticleConsumptionAddComponent.asp?ShoeID=<%= request("ShoeID")%>"> Add Component </a></td> </tr> </table> <input type="submit" value=" Submit " name="buttonAdd"> </form> <% set rs = nothing Conn.close %> </body> </html> Code (markup):
here is the screen shot to give you guys an idea on what i looks like. I need to save all the data on the inputbox when i click the Submit button. I have been trying to finish this project for almost a week now I hope someone can help me.
Hi, few suggestion: 1) Change the input (with type='submit') to asp:Button and add event handler for OnClick. 2) in the event handler you can get all the information from fields (add attribute runat='server' to them) and to save it file (you need System.IO name space http://msdn.microsoft.com/en-us/library/system.io.aspx Good Luck