running32
asked on
Exit server side script on ASP page
I need to validate that there are records returned. If not I need to exit the sever side script and display an alert box on the aspx.net page. How can I do this please. I do not want to use response.write I need the user to be alerted to the fact that there is no info for them.
Thanks
If objRdr.Read() Then
Response.Write(objRdr(0))
Else
response.Write("NO RECORDS RETURNED")
End If
Thanks
If objRdr.Read() Then
Response.Write(objRdr(0))
Else
response.Write("NO RECORDS RETURNED")
End If
ASKER
Nope that's not it. The page give the error no End if.
Does it say where ? It shouldn't be for that block.
ASKER
If I take out the Response.Write("<script language=""javascript"">al ert('NO RECORDS RETURNED');</script>" the page is ok again.
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If objRdr.Read() Then
Response.Write(objRdr(0))
Response.Write("<script language=""javascript"">al
Response.Flush()
Else
response.Write("NO RECORDS RETURNED")
End If