Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 18th, 2012, 06:16 AM
Registered User
 
Join Date: Sep 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default adding multiple textboxes for same university id

hello everyone,

Actually I have got a problem and would be really grateful if you could help me.I have got a textbox for course title and when clicking on a addmore button another textbox appears for coursetitle.These need to get saved to the sql server.This must be done only using asp and vbscript.I have done it as follows but it is not working(its only part of the codes)


if request("AddMore")<>"" then
CTitle=trim(request("qCTitle"))
CID=trim(request("qCID"))



set rx=Server.CreateObject("adodb.recordset")
rx.Open "COURSE" ,con, 1, 2, &H0002

With rsa
.AddNew
.fields("CID").value = CID
.fields("CTitle").value = CTitle


.Update
.Requery
.MoveLast
.Close

End With




response.redirect "zsave.asp?





end if

delete=trim(request("delete"))

if delete<>"" then


set rsd =Server.CreateObject("adodb.recordset")
set rsd = con.Execute("delete from COURSE where CID='" & CID&"'")


end if

<html>

'<%
'if CourseID <>"" then
'set dy =Server.CreateObject("adodb.recordset")
'set dy =con.Execute("SELECT CTitle.* FROM COURSE WHERE CID = '"&CID&"')
'do while not dy.eof


'%>


<tr>






<td class="gif">Course Title</td>

<input type="text" name="CTitle" <%=Fls%> size="60" value="<%=CTitle%>" ></td>

<td><a href="Courser.asp?delete=<%=CID%>">Delete</a> </td>


<tr></tr>

<%
dy.movenext()
loop
end if
%>



<tr>

<input type="text" name="qCTitle" <%=gif%> size="60" ></td>
<td><a href="Course.asp?delete=<%=CID%>">Delete</a> </td>

<!-- <td width="19%" class="gif">
C ID</td>-->
<td width="19%" class="gif">


<input type="text" READONLY name="qCeID" size="10" value="<%=CID%>" ></td>


</tr>


and how to increment the value for the different CID.


thanks a lot in advance .

thanks and regards,

shenazj





Similar Threads
Thread Thread Starter Forum Replies Last Post
textboxes or list boxes with multiple fore color svharishtech Pro VB 6 5 April 20th, 2007 05:04 PM
Help: character and multiple textboxes snoopy_sweden Javascript How-To 0 February 20th, 2007 04:08 AM
Validate Multiple Textboxes ~Bean~ ASP.NET 1.0 and 1.1 Professional 2 October 11th, 2005 03:03 PM
Using loop to change text of multiple textboxes snowy0 VB.NET 6 July 29th, 2004 08:54 AM
Adding in textboxes slgknjn Beginning VB 6 1 July 20th, 2004 12:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.