How to do a display in aspRSS

13 replies

Last post Nov 07, 2006 08:09 AM by tomkmvp

  • How to do a display in asp

    Nov 05, 2006 10:27 AM|deemurphy|LINK

    I have the following code:

    <% if lcase(strPage) = "default" or lcase(strPage) = "contactus" then %>
        
        <% if Session("MemberLogin") = False then
        
        'response.write session("MemberLogin")
        'response.end%>

    I want one thing to show if the page is the default page and for it not to show if it is the they are in the member login. 

    Can some one tell me how to do this?

    I am using classis asp.  I need to display a graphic with a link which will take the user to another asp page.

     

    Thanks

    Dee 


    Darlene D. Murphy
    deemurphy_us@yahoo.com

     

    Darlene D. Murphy
    deemurphy_us@yahoo.com
  • Re: How to do a display in asp

    Nov 06, 2006 02:29 AM|mvolo|LINK

    If you are using ASP, then your code can look roughly like this:

    <% if isMember then %>
    Display member only content
    <% else %>
    Display public content
    <% end if %>

    The isMember variable is your custom variable that starts as False, and is set to True only if the user is determined to be authenticated by your code.  This can be based on a session variable that is set when the user logs in, or if you determine the presence of an encrypted cookie that is issued by your login page to authenticated users.  However, please be sure to follow secure practices when implementing your authentication system / using session state to store authentication information. 

    Check out this article for more information on session state and security concerns you need to be aware of (its about ASP.NET, but the same basic concerns apply):
    http://msdn.microsoft.com/msdnmag/issues/05/09/SessionState/default.aspx

    Thanks,

    Mike

    Mike Volodarsky
    CTO at LeanSentry
    Former IIS/ASP.NET PM

  • Re: How to do a display in asp

    Nov 06, 2006 07:25 AM|deemurphy|LINK

    This is what I am trying to display and I have two of them that I only want to display if you are not a member:

     <p></p>
                        <br>
                        <br>
                        <br>
                        <br>
                        <br><br><a href="../web/myprofile.asp?act=new"><img src="../images/jointoday.jpg" alt="signupnow" border="0" /></a></td>
                    </tr>

    Right now it is appearing on both pages of the contact us area. I think a display might show the href code as well.

     

    Thank you

    Dee 

     

    Darlene D. Murphy
    deemurphy_us@yahoo.com
  • Re: How to do a display in asp

    Nov 06, 2006 08:30 AM|tomkmvp|LINK

    Is sounds like some of your vars are not getting set correctly. Can you show all of your code?
  • Re: How to do a display in asp

    Nov 06, 2006 08:42 AM|deemurphy|LINK

    Here is all the code:

    <table border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                <img src="../assets/flashbot.jpg" width="186" height="60" border="0" align="left" >        </td>
            <td width="11" background="assets/rtshadow.jpg" ></td>
        </tr>
    </table>

    <table width="175" border="0" cellpadding="0" cellspacing="0">

        <% if lcase(strPage) = "default" or lcase(strPage) = "contactus" then %>
       
        <% if Session("MemberLogin") = False then
       
        'response.write session("MemberLogin")
        'response.end%>
        <tr>
            <td width="175" valign="top">
                <table align="left" border="0" cellpadding="0" cellspacing="2">
                    <tr>
                        <td width="10">&nbsp;</td>
                        <td align="left" class="SideHeadingFONT">
                            <img src="../assets/greenbulletleft.jpg"   border="0" alt="">&nbsp;<a href="../web/login_trouble.asp" class="SideHeadingFONT">Forgot Password?</a>
                            <br><font class="SideBodyFONT">Click the above link to have your password sent to you automatically. <br><br>
                        </td>
                    <form name="form2" method="post" action="/web/loginprocess.asp">
                    <tr>
                        <td width="10">&nbsp;</td>
                        <td align="left" class="SideHeadingFONT">
                            <img src="../assets/greenbulletleft.jpg"   border="0" alt="">&nbsp;&nbsp;&nbsp;Member Login
                        </td>
                    </tr>
                    <tr>
                        <td width="10">&nbsp;</td>
                        <td align="left" class="SideHeadingFONT">
                            UserID: <input name="userid" type="text" value="" size="20">
                          </td>
                    </tr>
                    <tr>
                        <td width="10">&nbsp;</td>
                        <td align="left" class="SideHeadingFONT">
                              Password: <input name="password" type="password" value="" size="20">
                        </td>
                    </tr>
                    <tr>
                        <td width="10">&nbsp;</td>
                        <td align="center">
                              <input name="submit" type="submit" value="Login" size="20">
                        </td>
                    </tr>
                    </form>
                    <tr>
                        <td width="10">&nbsp;</td>
                      <td align="left" class="SideHeadingFONT"><br>
                            <img src="../assets/greenbulletleft.jpg"   border="0" alt="">&nbsp;&nbsp;&nbsp;<a href="../web/myprofile.asp?act=new" class="SideHeadingFONT">Sign up Now!</a>
                            <br><img src="../images/orangebullet.jpg" border="0"><font class="SideBodyFONT">&nbsp; Gain full access to our in-depth TPA Profiles
                            <br><img src="../images/orangebullet.jpg" border="0"><font class="SideBodyFONT">&nbsp;Search for a TPA partner that is right for you
                            <br><img src="../images/orangebullet.jpg" border="0"><font class="SideBodyFONT">&nbsp;Acquire knowledge from TPA firm Executives<br>
                            <img src="../images/orangebullet.jpg" border="0"><font class="SideBodyFONT">&nbsp;Obtain fresh insights to help you grow your business<br>
                            <img src="../images/orangebullet.jpg" border="0"><font class="SideBodyFONT">&nbsp;Discover new distribution opportunities<br>
                            <img src="../images/orangebullet.jpg" border="0"><font class="SideBodyFONT">&nbsp;And much more!<br>
                        <p></p>
                        <br>
                        <br>
                        <br>
                        <br>
                        <br><br><a href="../web/myprofile.asp?act=new"><img src="../images/jointoday.jpg" alt="signupnow" border="0" /></a></td>
                    </tr>
                   
                <tr>
                        <td width="10">&nbsp;</td>
                        <td align="left" class="SideHeadingFONT"><br>
                            <img src="../assets/greenbulletleft.jpg"   border="0" alt="">&nbsp;&nbsp;&nbsp;<a href="../web/myprofile.asp?act=new" class="SideHeadingFONT">Complete a FREE TPA Profile</a>
                            <font class="SideBodyFONT"><br>Promote your TPA firm and its retirement plan capabilities with leading broker-dealers and financial advisors across the nation by completing a FREE TPA Profile TODAY.
                        <p></p>
                        <br>
                        <br>
                        <br>
                        <br>
                        <br>
                        <br><br><a href="http://65.175.72.218/Survey/TakeSurvey.asp?SurveyID=8M3mm3KH889LI"><img src="../images/greenTakeATPAProfile.jpg" border="0"></a>
                        </td>
                    </tr>
               
                       
                    <tr>
                        <td width="10">&nbsp;</td>
                      <td align="left" class="SideHeadingFONT">&nbsp;</td>
                    </tr>
                   
               </table>
            </td>
        </tr>
        <%end if%>
       
        <% if Session("MemberLogin") = True then
       
        'response.write session("MemberLogin")
        'response.end%>
        <tr>
            <td width="186" valign="top">
                <table align="center" border="0" cellpadding="0" cellspacing="2">
                <% if lcase(strpage) <> "contactus" then %>
                    <tr>
                        <td width="10">&nbsp;</td>
                        <td align="left" class="SideHeadingFONT">
                            <img src="../assets/greenbulletleft.jpg"   border="0" alt="">&nbsp;&nbsp;&nbsp;<a href="../web/myprofile.asp" class="SideHeadingFont">My Profile</a>
                        </td>
                    </tr>
                    <% end if %>
                    <tr>
                        <td width="10">&nbsp;</td>
                        <td align="left" class="SideHeadingFONT"><br>
                            <img src="../assets/greenbulletleft.jpg"   border="0" alt="">&nbsp;&nbsp;&nbsp;<a href="../web/myprofile.asp?act=new" class="SideHeadingFONT">Complete a FREE TPA Survey Today</a>
                                <br><img src="../images/orangebullet.jpg" border="0"><font class="SideBodyFONT">&nbsp;<font class="SideBodyFONT">Survey participation is EASY and REWARDING.
                                    <br><img src="../images/orangebullet.jpg" border="0"><font class="SideBodyFONT">&nbsp;Receive a complementary survey highlights report with valuable peer insights from leading TPA Executives around the nation.<br>
                                    <br><img src="../images/orangebullet.jpg" border="0"><font class="SideBodyFONT">&nbsp;<font class="SideBodyFONT"><br>Become eligible for a cash sweepstakes<br>
                                    Survey completion only takes a few minutes, so click on the link below to participate TODAY!                       
                   
                        <br><br><a href="http://65.175.72.218/Survey/TakeSurvey.asp?SurveyID=8M3mm3KH889LI"><img src="../images/greenTakeATPAProfile.jpg" border="0"></a>
                        </td>
                    </tr>
            <tr>
                        <td width="10">&nbsp;</td>
                        <td align="left" class="SideHeadingFONT"><br>
                            <img src="../assets/greenbulletleft.jpg"   border="0" alt="">&nbsp;&nbsp;&nbsp;<a href="../web/myprofile.asp?act=new" class="SideHeadingFONT">Locate a TPA</a>
                                <br><img src="../images/orangebullet.jpg" border="0"><font class="SideBodyFONT">&nbsp;<font class="SideBodyFONT">In an area near you.
                                    <br><img src="../images/orangebullet.jpg" border="0"><font class="SideBodyFONT">&nbsp;Possessing the capabilities and characteristics you ar looking for in a TPA partner.<br>
                                    <img src="../images/orangebullet.jpg" border="0"><font class="SideBodyFONT">&nbsp;<font class="SideBodyFONT">That is the right fit for a specific retirement plan case opportunity<br>
                                   
                                   
                        <br><br><a href="../web/benchmarking.asp"><img src="../images/greenTPAPeerBenchmarking.jpg" border="0"></a>
                        </td>
                    </tr>
               </table>
            </td>
        </tr>
           
        <%end if%>
       
        <%end if%>
       
       
       
        <%
        While ((Repeat3__numRows <> 0) AND (NOT rsRelated.EOF))
        abstract2 = rsrelated.fields.item("abstract").value
        descR = rsrelated.fields.item("description2").value
        linkurl = rsrelated.fields.Item("linkURL").value
        %>
        <tr>
            <td width="186" align="center">
                <img src="assets/greyline.jpg" width="165" height="1" border="0" align="center" >   
            </td>
        </tr>
       
        <tr>
            <td width="186"  valign="top" >
                <table align="left" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="4">&nbsp;&nbsp;</td>
                        <td valign="top">
                                </td>
                        <td valign="top" align="left"><img src="../assets/greenbulletleft.jpg"  border="0" alt="">&nbsp;&nbsp;&nbsp;
                        </td>
                        <td valign="top" align="left">
                            <% if rsRelated.Fields.Item("description2").Value <> ""<> 0 then %>&nbsp;
                          <a href="../web/L5.asp?recid=<%=(rsRelated.Fields.Item("recid").Value)%>&SID=<%=(rsRelated.Fields.Item("SID").Value)%>"  class="SideHeadingFONT">
                            <%=(rsRelated.Fields.Item("Title").Value)%> </a>
                        <% else %>
                            <% if rsRelated.Fields.Item("linkURL").Value <> "" then
                                l5 = "N"%>
                        <a href="<%=(rsRelated.Fields.Item("linkURL").Value)%>" class="SideHeadingFONT"><%=(rsRelated.Fields.Item("Title").Value)%></a>
                            <% else %>
                        <font class="SideHeadingFONT"><%=(rsRelated.Fields.Item("Title").Value)%></font>
                            <% end if %>
                        <% end if %>
                          </td>
                        <td valign="top">&nbsp;&nbsp;
                                </td>
                    </tr>
              </table>
            </td>
        </tr>
        <tr>
            <td width="195"  valign="top" >
                <table align="left" border="0" cellpadding="4" cellspacing="0">
                    <tr>
                        <td width="14"></td>
                        <td valign="top">
                            <% if rsrelated.Fields.Item("Imagename").Value <> "" then %>
                                <img src="../images/<%=(rsrelated.Fields.Item("Imagename").Value)%>"  align="left" class="imagefont">  </font>
                            <% end if %>
                            <% if abstract2 <> "" then %>
                           <font class="SideBodyFONT"><%=Abstract2%><br>
                          <% else
                             if descR <> "" then%>
                                  <font class="SideBodyFONT"><%=descR%><br>
                          <%
                             end if
                          end if %>
                            <% if abstract2 <> "" and descR <> "" then
                                if linkurl = ""  or isnull(linkurl) then %>
                                    <div align="right">  <a href="../web/L5.asp?recid=<%=(rsRelated.Fields.Item("recid").Value)%>&SID=<%=(rsRelated.Fields.Item("SID").Value)%>"  class="SideBodyFONT">
                            More Information</a></div>
                              <% else%>
                                    <div align="right">       <a href="<%=(rsRelated.Fields.Item("linkURL").Value)%>" class="SideBodyFONT">
                            More Information</a></div>
                              <% end if
                              else
                                  if linkurl <> "" then%>
                                    <div align="right">       <a href="<%=(rsRelated.Fields.Item("linkURL").Value)%>" class="SideBodyFONT">
                            More Information</a></div>
                                <% end if
                              end if%>
                         </td>
                        <td valign="top">&nbsp;&nbsp;&nbsp;
                                </td>
                    </tr>
              </table>
          </td>
        </tr>
        <tr>
            <td width="186" align="center">
                <img src="assets/greyline.jpg" width="165" height="1" border="0" >   
            </td>
        </tr>
    <%
    Repeat3__index=Repeat3__index+1
    Repeat3__numRows=Repeat3__numRows-1
    rsRelated.MoveNext()
    Wend
    rsRelated.Close
    %>
    <tr><td align="left" valign="top">
    <div align="center">
                             <br>
                        <!--#include file="admentor/include/admentor3.asp"-->
                       <%=AdMentor_GetAdASP("F=7&Z=7&N=1")%>
     </div>
     </td></tr>
    </table>

    Thanks

    Dee 

    Darlene D. Murphy
    deemurphy_us@yahoo.com
  • Re: How to do a display in asp

    Nov 06, 2006 08:46 AM|tomkmvp|LINK

    Where are you setting the value for strPage?
  • Re: How to do a display in asp

    Nov 06, 2006 09:00 AM|deemurphy|LINK

    It needs to be set here:

    <br><br><a href="../web/myprofile.asp?act=new"><img src="../images/jointoday.jpg" alt="signupnow" border="0" /></a></td>
                    </tr>

    and

    <br><br><a href="http://65.175.72.218/Survey/TakeSurvey.asp?SurveyID=8M3mm3KH889LI"><img src="../images/greenTakeATPAProfile.jpg" border="0"></a>
                        </td>

     These need to display if you are not login to the membership.

    Thanks

    Dee 

    Darlene D. Murphy
    deemurphy_us@yahoo.com
  • Re: How to do a display in asp

    Nov 06, 2006 10:43 AM|tomkmvp|LINK

    I understood that.

    Why do you have this line of code?
    <% if lcase(strPage) = "default" or lcase(strPage) = "contactus" then %>

    strPage never gets a value so none of that code in the If block ever runs.

  • Re: How to do a display in asp

    Nov 06, 2006 10:53 AM|deemurphy|LINK

    Tere is difference verbage on the contact us page when you are not login as a member and you want them to become members.

     I did not write all of the orginal code and was asked to fix this and I can't seem to figure out how.

    Dee 

    Darlene D. Murphy
    deemurphy_us@yahoo.com
  • Re: How to do a display in asp

    Nov 06, 2006 11:47 AM|jeff@zina.com|LINK

    We understand the text on the page is different depending on whether they are logged in or not.  The problem is that the variable that determines what content is displayed doesn't get set in your code.  That means the variable won't match the cirteria, so none of the content in that section will get displayed.

    Jeff

    Have you Binged a solution before posting?
  • Re: How to do a display in asp

    Nov 06, 2006 11:56 AM|deemurphy|LINK

    Would it help if I could point you to the web site which is live and give you a login.

    Dee 

    Darlene D. Murphy
    deemurphy_us@yahoo.com
  • Re: How to do a display in asp

    Nov 06, 2006 02:55 PM|tomkmvp|LINK

    No - it would better help if you explained the logic needed.  It looks like the code on that page is incomplete - we could probably fix it if we understod what it needs to do.
  • Re: How to do a display in asp

    Nov 06, 2006 02:59 PM|deemurphy|LINK

    Once you log in this code is applied and stays applied unless you log off

    if (session("ainmemberlogin") = True) Or (Session("MemberID") <> "") then %>   

    Dee 

    Darlene D. Murphy
    deemurphy_us@yahoo.com
  • Re: How to do a display in asp

    Nov 07, 2006 08:09 AM|tomkmvp|LINK

    That does not make sense - you use Session("MemberLogin") in the code you provided.

    Is this code getting used as an include on other pages?