Link to home
Start Free TrialLog in
Avatar of Stiebel Eltron
Stiebel EltronFlag for Thailand

asked on

How to add Response.Write line in ASP?

Dear EE experts,

I'm not sure for the title of my thread on how to ask it. But I would like to ask for tech support on how to add this Response.Write line in ASP...

Please see the attached screenshots & codes,
The first image is the screenshot of before user logins & inside of that page, the first code is included...

What I want to happen is to add a link (that is hidden if user hasn't login yet, and will show if the user login = true), on the right column beside the "REGISTERED USERS".

I tried to put & use the 2nd code on that space, but it gives me a 500 Internal Server error... and everytime I remove that code, it returns to it's normal state...

This hidden link will be shown when the user logs in & if the user clicks it, it'll redirect the user to the upload page, so I need to put the it's path location as well...

That would be all & hope to hear soon...
* First code:
------------------------
<%
   '// If user is logged in show name and logout link
   If Session("loggedin") = true Then
      Response.Write "Welcome: " & Session("name")
      Response.Write "<br /><a href=""../asia/login2/logout.asp"">Logout</a>"
   Else
      Response.Write "<a href=""ste-iphoto-login.asp"" title=""CLICK TO LOGIN"">REGISTERED USERS</a>"
   End If
%>
----------------------------------
2nd code:
<%
   If Session("loggedIn") = true Then
   Response.Write "<a href=""" & rsProducts("iDownload") & """>DOWNLOAD</a>"
   End If
%>

Open in new window

1st-img.jpg
after-login.jpg
Avatar of strickdd
strickdd
Flag of United States of America image

Where are you setting: rsProducts("iDownload")?
Avatar of Stiebel Eltron

ASKER

It is connected to a db. But how if I will change that "rsProducts("iDownload")" by a link that will direct a user to the Upload Page, another page... That will only show the link "UPLOAD" if the user logs in...
ASKER CERTIFIED SOLUTION
Avatar of strickdd
strickdd
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Everything works! Great!

I just add the link here:
<%
   If Session("loggedIn") = true Then
   Response.Write "<a href=""http://"">UPLOAD</a>"
   End If
%>

It's working so it means that I did correct :-)
Excellent!