Re: How do you display html page with one cond. but not with other
am 19.11.2004 19:49:23 von raydanEither add a Response.End immediately after :
Clik here
Or move "End If" to the end of your code.
"Jack"
news:0C299966-1831-4392-BEFC-F3F9918562EE@microsoft.com...
> Hi, I have code where I would like to display the contents of HTML stuff
if
> one condition is satisfied and not when the other condition is satisfied
(but
> error message)i.e. when Session("authenticated") = False then I do not
want
> to display HTML contents. How does one do that? Presently, the HTML
contents
> are being displayed with either of the if cases. Thanks for any help.
> CODE:
> strSQL = "select PeopleNameFirst, PeopleNameLast, PeopleClubCode from
People
> where " & _
> "PeopleNameFirst ='" & Request.Form("txtFirstName") & "' AND " & _
> "PeopleNameLast ='" & Request.Form("txtLastName") & "' AND " & _
> "PeopleClubCode ='" & Request.Form("txtPassword") & "'"
> 'Response.Write strSQL
> RS.Open strSQL
> %>
> 'Check for empty recordset which indicates user information was not found
> <%
> If RS.EOF or RS.BOF Then
> Session("Authenticated") = False
> %>
> Sorry, your userid or password did not match
or you have not
registerd
> yet. Please register.
> Clik here
> <%
> Else
> Session("Authenticated") = True
> Response.Cookies("Sailors")("FirstName") = Request.Form("txtFirstName")
> Response.Cookies("Sailors")("LastName") = Request.Form("txtLastName")
> Response.Cookies("Sailors")("Password") = Request.Form("txtPassword")
> Response.Cookies("Sailors").expires = Date + 365
> End If
>
>
>
>
>
>
>
>
> Sailors Case Study
>
>
>
>
>
> %>