home *** CD-ROM | disk | FTP | other *** search
- <html>
- <%
-
- Set Conn=Server.CreateObject("ADODB.Connection")
-
- Conn.Open "DSN=LocalTraining"
-
- SQL = "Select Course.* From Course Where Course.ID = " & Request.QueryString("ID")
-
- Set RSCourse = Conn.Execute(SQL)
-
- SQL = "Select Category.* From Category"
-
- Set RSCategory = Conn.Execute(SQL)
-
- %>
-
- <head>
- <title>Edit Course</title>
- </head>
- <body bgcolor="#FFFFFF">
- <h1>Edit Course</h1>
- <form action="SaveCourse.asp" method="POST" name="Edit Course">
- <input type="hidden" name="Course_ID" value="<%=RSCourse("ID")%>">
- <table border="0">
- <tr>
- <td><strong>Category:</strong></td>
- <td><select name="Category" size="1">
- <%Do While Not RSCategory.EOF
-
- If RSCategory("ID") = RSCourse("Category") Then
- %>
- <option selected value="<%=RSCategory("ID")%>"><%=RSCategory("name")%></option>
- <% Else%>
- <option value="<%=RSCategory("ID")%>"><%=RSCategory("name")%></option>
- <% End If
-
- RSCategory.MoveNext
- Loop
- %>
- </select></td>
- </tr>
- <tr>
- <td><strong>Number:</strong></td>
- <td><input type="text" size="5" name="Number"
- value="<%=RSCourse("Number")%>"></td>
- </tr>
- <tr>
- <td width="80"><strong>Title:</strong></td>
- <td><input type="text" size="50" name="Title"
- value="<%=RSCourse("Title")%>"></td>
- </tr>
- <tr>
- <td valign="top"><strong>Description:</strong></td>
- <td><textarea name="Description" rows="2"
- cols="50"><%=RSCourse("Description")%></textarea></td>
- </tr>
- <tr>
- <td valign="top"><strong>Audience:</strong></td>
- <td><textarea name="Audience" rows="2"
- cols="50"><%=RSCourse("Audience")%></textarea></td>
- </tr>
- <tr>
- <td valign="top"><strong>Prerequisites:</strong></td>
- <td><textarea name="Prerequisites" rows="2"
- cols="50"><%=RSCourse("Prerequisites")%></textarea></td>
- </tr>
- <tr>
- <td><strong>Cost:</strong></td>
- <td><input type="text" size="20" name="Cost"
- value="<%=RSCourse("Cost")%>"></td>
- </tr>
- <tr>
- <td><strong>Duration:</strong></td>
- <td><input type="text" size="20" name="Duration"
- value="<%=RSCourse("Duration")%>"></td>
- </tr>
- <tr>
- <td> </td>
- <td><p align="right"><input type="submit"
- name="Submit" value="Save"><input type="submit"
- name="Submit" value="Delete"></p>
- </td>
- </tr>
- </table>
- </form>
- </body>
- </html>
-