UltraDev 101

ADMINISTRATION - Passing the variable for update & delete page
  


  


We’re gonna design the update and delete page the quick and easy way. It may not "look" the best, and it surely wouldn’t be good for databases with 1,000’s of entries… but for small databases it’s perfectly OK J

Update Page


This page is a mix between displaying basic records and passing variables. We’ve already done both of these things, but let’s go ahead and create these pages together.

Create a new pages named "updaterecord.asp". On that page open up Window > Data Bindings and use the + sign to create a connection Recordset (Query) to the database. Again! You have to do this for EVERY SINGLE PAGE you want to interact with your database. This does not need a filter. Sort by last name Ascending.

Format the page how you want it, and insert the first and last name fields onto the page. Then using the Window > Server Behaviors use the + sign to Repeat Region of the names. But this time instead of specifing only to display a certain amount of records, choose to display all records.
  


Create a new blank page called "updaterecordetails.asp" that we will link up to next. Go back to your "updaterecord.asp" page.

Once you are done with that select the first and last name fields and make them a link with the ID variable being passed just like you did before. You’ll have to open up the HTML to do this. And your code should look like this when are you are done:

<a href="updaterecorddetails.asp?ID=<%=(rsUpdate.Fields.Item("ID").Value)%>">
<%=(rsUpdate.Fields.Item("first").Value)%>
<%=(rsUpdate.Fields.Item("last").Value)%>
</a>


So here is a screenshot of the UltraDev file and then what will display when you test it:

Delete Page


This page is almost exactly the same as the "updaterecord.asp" file. So open that file and resave it as "deleterecord.asp". Now you just need to change the link on the first and last name.

Create a new blank page and save it as "deleterecorddetails.asp". Now go back to your "deleterecord.asp" page. And in the HTML source code change this portion of the link from:

<a href="updaterecorddetails.asp?ID=<%=(rsUpdate.Fields.Item("ID").Value)%>">

to:

<a href="deleterecorddetails.asp?ID=<%=(rsUpdate.Fields.Item("ID").Value)%>">

In total you shoud have four new admin pages: updaterecord.asp, updaterecordetails.asp, deleterecord.asp and deleterecorddetails.asp
  


  




© Copyright 1999-2001/ USA America Inc.All rights reserved. Last updated --  Read our Privacy Policy

  
Webmaster & Submissions:
Contact Administration

Site Advertising:
Rates and Information


» Get tutorial template
» Virtual-FX Team




 

Download the buttons
Join our mailing list!
Enter your Email address below, then click the 'Join List' button: 

Subscribe Unsubscribe
Powered by ListBot