Maybe not the complete answer, but here is a helper.
If Request.Queryst ring("id") = "" then
TidF=Request.Fo rm("TidF")
Else
TidF=Request.Qu erystring("id")
End If
if ( Request.Queryst ring("id") is nothing) then
'' "id" not present, check for TidF
if not (Request.Form(" TidF") is nothing) then
TidF=Request.Fo rm("TidF")
else
throw new ArgumentExcepti on("Form( TidF ) expected.")
end if
else
if Request.Queryst ring("id").Leng th <= 0 then
throw new ArgumentExcepti on("Querystring ( id) expected.")
end if
TidF=Request.Qu erystring("id")
end if
Don't check for empty strings as the "exists or not exists". Check for the
object existing or not (null in C# / Nothing in VB.net)
...
<ea********@gma il.comwrote in message
news:vN******** ************@ec lipse.net.uk...
Sorry for the post in this NG but im short on time to get this working
and i haven't seem to of got a response anywhere else.
Im pretty new to asp so all light on this question would be great.
Basically i need to test to see what value is set (where to retrieve the
data from) so ive done it like this:
If Request.Queryst ring("id") = "" then
TidF=Request.Fo rm("TidF")
Else
TidF=Request.Qu erystring("id")
End If
The data Request.Form("T idF") comes from a form if submit is pressed.
The data Request.Queryst ring("id") comes from the url being .asp?id=number
However it seems to keep looping round even though i have ended the if
statement and set the var.
all help would be great thanks.