how to count number of times file downloaded from my website using c# asp.net .I want to show it on website. please reply.thx in advance.
manoj_dabs
0
Newbie Poster
Recommended Answers
Jump to PostWith download code, you may update increment counter to a database or file.
Steps:
1. When user clicks on button to download a file.
2. Read increment counter value from database or from file.
3. Increment by 1.
4. Write to a file or update to a database.
Jump to PostWell I presume that your files for downloading purpose are located in a folder named myfiles under web application root.
Write following code in Button's click event where file downloading process starts.
protected void Button1_Click(object sender, EventArgs e) { DownLoadFile("test.zip"); // This file is located under …
Jump to Postwell why u didn;t agreed with application variable which is global...
or u suggest why not to use an application variable...?
Well I presume that your files for downloading purpose are located in a folder named myfiles under web application root.
Write following code in Button's click event where …
All 10 Replies
kvprajapati
1,826
Posting Genius
Team Colleague
manoj_dabs
0
Newbie Poster
kvprajapati
1,826
Posting Genius
Team Colleague
dnanetwork
18
Practically a Master Poster
Banned
kvprajapati
commented:
I am not agree.
-1
dnanetwork
18
Practically a Master Poster
Banned
sknake
1,622
Senior Poster
Featured Poster
kvprajapati
1,826
Posting Genius
Team Colleague
dnanetwork
18
Practically a Master Poster
Banned
sknake
1,622
Senior Poster
Featured Poster
johnly
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.