IIS 5 & IIS 6
Compare Form item to database item
Last post Aug 05, 2012 12:33 AM by Ken Schaefer
Aug 02, 2012 05:47 PM|tim8w|LINK
I need to be able to compare a forms item to a database field item. I have a Form with the following table:
<table width="95%" border="1" align="center" bgcolor="#EEEEEE">
<td class="RequiredField">Select a Shipper:</td>
<td colspan="3"><select name="Shippers<%=(x)%>" id="Shippers<%=(x)%>" onChange="Shippers_Change(<%=(x)%>)">
While (NOT Shippers.EOF)
If ( Shippers.Fields.Item("ContentOwnerID").Value = document.EntryForm.ContentOwnerID.value ) Then
If (Shippers.CursorType > 0) Then
The lines in bold is what I want to do, but it is not working. Is my only option to post and get the form value back in order to compare it to the database value?
Aug 05, 2012 12:33 AM|Ken Schaefer|LINK
ASP runs entirely on the server (hence Active Server Pages). It doesn't know anything about the values that a user has filled into a form.
So, you have two options:
a) do a form submit (POST or GET) to send the values back to the server
b) use AJAX to send the values back to the server asynchronously
Only then will the server have this data, and your ASP code will be able to do something.