473,569 Members | 3,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Authorize before download a file in asp.net

Could any one tell me how to deal with the following problem:

If user has not login the system, when he click the url for downloading a
file he will be re-direct to the
login page. Just as I download the sample code in Codeproject.com .

Thanks all
Nov 18 '05 #1
1 1350
Hi Ben,
I am not sure how it is Done Code Project, but a simple logic whihc i can
derive is have the LinkButton on the webpage for downloading, when the user
clicks on the download link. in the LinkButton_Clic k event Check for the
Valid User something like
if(Session["UserName"].ToString().Len gth<=0)
Server.Transfer ("Login.aspx ");
else
Response.write( "<Script>locati on.href='Downlo ad.zip'</script>");

Hope this works for you i do remember doing this a long time back.. i do not
have the code right now.

but this will have impact on the post back!!

so the Redirecting
"Ben Chen" wrote:
Could any one tell me how to deal with the following problem:

If user has not login the system, when he click the url for downloading a
file he will be re-direct to the
login page. Just as I download the sample code in Codeproject.com .

Thanks all

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
11190
by: William C. White | last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using cURL? Our website is hosted on a shared drive and the webhost company doesn't installed additional software (such as cURL) on the server because of that. Our site will have an SSL certificate next week, so I would like to use AIM instead of SIM, however, I don't know how...
1
3771
by: GluedToTheScreen | last post by:
I have a small PHP ecommerce site set up using Authorize.net's SIM (simple) interface. Working fine, but... I'd like to implement their AIM interface (so visitor's will never see the gateway's URL). I found a script that does this but requires cURL... and my hosting provider doesn't support it. Here is the snippet of the code that uses...
1
2693
by: machodev | last post by:
Hello Friends, Getting a bit fuzzy on the Authorize.net and the Curl Integration. I have the script using the for the authorize.net Integration with the curl command exec("/usr/local/bin -m 120 -d \"$data\" $authnet_url", $return_string); well the curl path is right /usr/local/bin/
3
3510
by: Blue | last post by:
I'm using Authorize.net as my payment gateway and as of approx 7pm PST on 12/26/05, no payments have gone through from my website. (However, I can still process payments through the Auth net virtual terminal.) When you try to complete the checkout, you get the following error: =============================================== ASPtear error...
1
1510
by: jesmi | last post by:
i created my test account in authorize.net. but it didn't provide me the username and password. i want to use authorize.net by using my test account.so anybody please help me. thanks in advance
4
3514
by: Adrienne Boswell | last post by:
Does anyone know if it is possible to do recurring billing to Authorize.net using ASP Classic. I have no problem doing one time transactions. -- Adrienne Boswell at Home Arbpen Web Site Design Services http://www.cavalcade-of-coding.info Please respond to the group so others can share
2
1639
by: singh.udaybir | last post by:
What are the Steps to make Shopping Cart From Test Account to Live Account . in which files changes are to be made and what changes. Authorize.net + OsCommererce using
1
47391
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or...
1
2833
by: vanitha05 | last post by:
hi everyone, In my application I am trying to get the response from authorize .net ,if i am using HTTP web response i am able to the response from site like approved or failed etc but if i mention x_relay_url(return url is the page to where authorize .net will send the response) ,it is not able to come back to the page. I am using...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7619
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7681
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6290
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5228
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
950
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.