[thelist] ASP 2 questions

Wade Armstrong wade_lists at runstrong.com
Sat Oct 26 04:12:01 CDT 2002

on 10/25/02 2:48 PM, Giles Carey | Element Design at gilescarey at supanet.com

> 1. <a href=edit.asp?id=" & rs(ID) & ">Further Information</CENTER></a></td>"
> However, I can only make this work properly by including the ID on the page,
> otherwise it references to id="some word in the Title".

If this is a direct cut-and-paste of the code, then your problem is rs(ID).
See how there's no quotes around ID? That means it's a variable, not a
literal. To reference the ID column, you'd want rs("ID") (technically, it
should be rs.Items.Fields("ID").Value for speed and explicitness, but that's
another story). Somewhere in the page, you've set the value of ID to some
number, so the ASP parser thinks you're referring to, say, rs(46), which
would be the 47th column referenced in the SELECT statement that creates the
recordset (47th because the index is 0-based).

Also, you should watch your nesting and quote your attribute values. <a
href="url"><center>Further Information</center></a> not <center><a
href=url>Further Information</CENTER></a>

> 2. I have a form submitting 4 entries but they are not all compulsory. How do
> I allow the user to fill in say only two..otherwise I get an error that I have
> not supplied enough elements.

I'll need more info to diagnose this. Is this a javascript error before you
submit? Or an error generated by ASP? If so, what's the error number and


More information about the thelist mailing list