Click to See Complete Forum and Search --> : Plz help


handshakeit
06-05-2006, 03:18 AM
Hello All

I have a new problem. I am to download a file from the server but before downloading the user must be authenticated.
I have a link at the page when user click on the link without logging in the link should tranfer to login page. and after logging in directly the download popup shuld open (on which user clicked) und redirected back to same page from where user clicked to download

LordHasan
06-05-2006, 10:08 AM
Hello
so ur users are authenticated, and their infos are stored in the session ?
if yes you can check the variables in the session and change the Navigateurl of your hyperlink.

Session("GO") = "1" 'this initialisation is to start the session if it wasn't
If Session("Loggendin") = "" Then
Me.Response.Redirect("login.aspx")
else
me.hyperlink1.navigateURL="myprog.exe"
end if

i hope that i replied

Regards
Lord Hasan

handshakeit
06-06-2006, 09:41 AM
you didn't got the problem
it is that
suppose user was not logged in and click link to download
he redirected to login fine but after clicking ligin button
the file should be downloaded withot again clicking link

LordHasan
06-06-2006, 01:31 PM
ok i got it now
so u should send the link of the file to the page of login

If Session("Loggendin") = "" Then
Me.Response.Redirect("login.aspx?target=myprog.exe")
else
me.hyperlink1.navigateURL="myprog.exe"
end if

and in the login page
after authentication you redirect to
Me.Response.Redirect(target)

handshakeit
06-08-2006, 04:44 AM
Thanks LordHasan

I willl try this..........