Forums

This topic is locked

Ultradv help

Posted 12 May 2004 02:55:35
1
has voted
12 May 2004 02:55:35 jackie goldsmith posted:
Hey all im a newbie to asp and ultradev but have been designing websites for 6 years so there my background heres my question.

So far i have a search, results, add, update and a list of everything page. How would i have the list page have a link to the update page. I want to pass the variable in the link so then that variable automatically populates the field and the info for that id shows. Im sure this is a moron question but ive only been playing with ud for 2 days.

Replies

Replied 12 May 2004 07:30:17
12 May 2004 07:30:17 Kevin Scott replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hey all im a newbie to asp and ultradev but have been designing websites for 6 years so there my background heres my question.

So far i have a search, results, add, update and a list of everything page. How would i have the list page have a link to the update page. I want to pass the variable in the link so then that variable automatically populates the field and the info for that id shows. Im sure this is a moron question but ive only been playing with ud for 2 days.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

-------------------
On the List Everything page just select the image or text that you want the user to click in order to edit that record. Then from the Server Behaviors choose "go to detail page" and select the Update page. From the drop down menues choose the correct recordset that your List is generated from; choose the ID that is unique to that database (usually ID or Autonumber, but it can be anything that is unique to that record) for the URL parameter; and typically you do not need to pass additional URL or Form. The column ID selected is then passed in the URL path using the format ?ID=5 for example.

The trickier part is on the receiving / update page. Here you mainly need to make sure that the recordset you've created is filtered on the URL parameter you're passing over, the ID. If it's just one parameter (like this simple example) you can set everything from the Simple dialog box. Select the same connection, the same table, and usually All fields; then select the unique field you're passing from the Filter dropdown box. Use the = URL Parameter and again ID. No need to sort since you've only got one record resulting. You can click test and type in any ID number in your database to see it filter correctly.

Now that you have a single record the rest is easy going. Just create a form on your page. Inside the form I like to create a simple table with 2 columns, 1 for labels and the other for textfields.

Insert a textfield for every piece of data from the recordset that you want someone to be able to edit. ie. Don't insert a field for the ID field for example.

Once you have all your textfields on the page, I like to rename them according to the data they're going to hold. Just click one, retype a name in the properties instead of 'textfield2' ... this is very helpful when setting up the Update server behavior. Anyway, to get the textfields to then populate automatically just click a textfield and add a Server Behavior for Dynamic Form Field. Using the lightning bolt select the appropriate datafield from the recordset and you're all set. Don't forget that if you're going to display an image you just insert an image like normal but from the dialog box select from Datasource and select the image path field. If you're editing the image path you do that the same as editing any text.

Best of luck,

Kevin, Net Freelance



Kevin
Replied 12 May 2004 20:55:00
12 May 2004 20:55:00 jackie goldsmith replied:
thanks kevin ill check into that

Reply to this topic