Jumping to pages based on a variable

Results 1 to 4 of 4

Thread: Jumping to pages based on a variable

  1. #1
    Simon Herman Guest

    Default Jumping to pages based on a variable

    I have generated an ASP page that shows the results of a SQL query. One of the fields comes up as a hyperlink, based on the value of that field, but I want to restrict it so that it only comes up as a hyperlink if it equals one of 3 values.<BR><BR>Code so far<BR>&#060;a href="&#060;%=Server.HTMLEncode(rs.Fields("Ext").V alue)%&#062;.htm"&#062;&#060;%=Server.HTMLEncode(r s.Fields("Ext").Value)%&#062;&#060;/a&#062;<BR><BR>So the link equals x.htm where x is the returned value of "ext"<BR>I want the link to be active only if "ext" equals the above mentioned values.<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969
    Posts
    240

    Default RE: Jumping to pages based on a variable

    This sounds very simple:<BR><BR>&#060;%<BR><BR>If x = Myvalue Then<BR><BR>[code here]<BR><BR>Else<BR><BR>[alternative code here]<BR><BR>End If<BR><BR>%&#062;

  3. #3
    Simon Herman Guest

    Default RE: Jumping to pages based on a variable

    The problem is putting a hyperlink in the [alternative code] section. Whenever I try, Frontpage makes usher and blotter of it<BR><BR>Any thoughts?<BR>

  4. #4
    Join Date
    Dec 1969
    Posts
    22

    Default RE: Jumping to pages based on a variable

    Use Notepad.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •