Click here to Skip to main content
15,897,518 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have one button called (Generate)


When i click the generate button the execl sheet will be download.

I want to validate when user click generate button for admin user many times the excel sheet will be download.

Suppose if the user is not admin user only one time excel will be downloaded. if the user generate the excel sheet second time show the message "you have already generate the excel sheet".

for that how can do in asp.net using c#.

Regards,
Narasiman P
Posted
Updated 22-Feb-15 22:23pm
v2
Comments
Er. Ajay Chauhan 21-Feb-15 3:21am    
for this, check user's id in your sessions on button click which you may be on page.....

1 solution

You can check user role on button click and for the first time you can set a bool filed to true in database. If the user click second time on the button then check that bool field if it is true then show the above message and return from there else allow them to download.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900