Response.Write "<b>You are not logged on............

Ask a Question related to ASP Components, Design and Development.

  1. #1

    Default Response.Write "<b>You are not logged on............

    I last posted to this group about 6 months ago and was very pleased by the
    excellent response I got and the great help offered to me. I am back this
    time with another request for your expert help on a bit of ASP code I use on
    my windows server 2003 with IIS6 machine.

    I would like the code below to display in different colours depending on the
    status of the page. I am looking to make the not logged in code appear red
    and the logged in code green.

    The code:
    <%
    If Len(Session("UID")) = 0 Then
    Response.Write "<b>You are not logged on. If You don't have a username
    or password you can register for one by clicking > </b>"
    Else
    Response.Write "<b>You are logged on as " & Session("UID") & "</b>"
    End If
    %>

    If anyone can help this would be great.

    Thank you

    malcolm


    mallyonline Guest

  2. Similar Questions and Discussions

    1. response.write URL
      I have a page which lists conferences and events which the company for which I coded the site attends or hosts themselves. They want to be able to...
    2. If response.write help
      Hi, I am trying to code my asp page so that if you are on page Y, the link to page Y in the nav, is in the over state to help users identify where...
    3. Response.Write and Response.Redirect
      On my Page_Load event, i need to do some validation and then either let them proceed, or display a error message and boot them back to the previous...
    4. Response.write tables
      There are no "table commands". If you're going to be doing any ASP at all, the first thing you should do is find out about HTML. <table> <% do...
    5. asp response.write doesn't display
      Maybe you could start with a more barebones file, especially one without an unclosed LINK tag:
  3. #2

    Default Re: Response.Write "<b>You are not logged on............

    "mallyonline" <malcolmkwhyte@btinternet.com> wrote in message
    news:di6jor$3ba$1@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
    > I last posted to this group about 6 months ago and was very pleased by the
    > excellent response I got and the great help offered to me. I am back this
    > time with another request for your expert help on a bit of ASP code I use
    on
    > my windows server 2003 with IIS6 machine.
    >
    > I would like the code below to display in different colours depending on
    the
    > status of the page. I am looking to make the not logged in code appear
    red
    > and the logged in code green.
    >
    > The code:
    > <%
    > If Len(Session("UID")) = 0 Then
    > Response.Write "<b>You are not logged on. If You don't have a username
    > or password you can register for one by clicking > </b>"
    > Else
    > Response.Write "<b>You are logged on as " & Session("UID") & "</b>"
    > End If
    > %>
    >
    > If anyone can help this would be great.
    >
    > Thank you
    >
    > malcolm

    This changes the background color:

    <%
    If Len(Session("UID")) = 0 Then
    Response.Write "<b style="background-color:lightgreen">You are not
    logged on. &nbsp; If You don't have a username or password you can register
    for one by clicking.</b>"
    Else
    Response.Write "<b style="background-color:red">You are logged on as " &
    Session("UID") & "</b>"
    End If
    %>

    This changes the font color:

    <%
    If Len(Session("UID")) = 0 Then
    Response.Write "<b style="color:green">You are not logged on. &nbsp; If
    You don't have a username or password you can register for one by
    clicking.</b>"
    Else
    Response.Write "<b style="color:red">You are logged on as " &
    Session("UID") & "</b>"
    End If
    %>


    McKirahan Guest

  4. #3

    Default Re: Response.Write "<b>You are not logged on............

    Hi Malcolm,

    If you want the text to display in the desired color try this

    <%
    If Len(Session("UID")) = 0 Then

    Response.Write "<b>" & "<font color = red>" & "You are not logged
    on. If You don't have a username or password you can register for one
    by clicking" & "</font>" & "</b>"

    Else

    Response.Write "<b>" & "<font color = green>" & "You are logged on
    as " & "</font>" & "</b>"

    End If
    %>

    Arun

    arunkumar_m2001@yahoo.com Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139