Web Programming , asp.net, sql server

I have an application, on a button click it generates a csv report file. I save this report and its settings
to a table in the database. I need an mechanism to keep track of these report, meaning in the table they are
saved with a unique UserID and time and date they ran the report and its settings. But instead of date and time
i want to keep a counter for these reports for each user.Also, on a button click i want to first prompt if
they user wants to save this report settings with a name they choose, if they don't give a name, just save it
with a unique id or name generated.

yes you can use something like control.PostBackUrl="~/reportPage.aspx" property.
but I think there is a better solution, using the original page add a textbox that contains your generated name and allow

sorry; can you explain further, and what exactly the problem to do what you want?
btw: you flagged it in web services zone, do you mean you need a web service to do that?
is the original application a windows form, or asp.net?

sorry about that. Application is in asp.net.
I have a aspx page in my website,where user can generate their reports. Users can select the data they want to
see in their report and hit a button. All the data they selected, which are the column name from a table,
are dumped to a csv file. At the same time, the settings they chose or the column they selected are saved as
settings in another table, which they can view later. Right now, i save these settings with a default name (
eg report_9/19/2011) and settings (column names) in the table. but i want to make it more like a counter such as (report 1,
report 2 and so on). Also when they hit generate report button, i want to prompt them if they want to save
it with a different name. I'm not sure if a javascript can do this or do i have to do this in the code behind.

Regarding a unique Counter, per user, per run then you need to add a field in the table for the counter
when you save it you just select max(counterfiled) + 1 for the current user, and then use it as a name, (this is the simplest if you also assume that the same user is not opening this form from multible browsers/computers)

Thank you for the reply. one more question is can a button click event be tied with both server side and javascript methods? I need to pop up the message if they want to save the file with a different name and after they hit ok or cancel i need to proceed with the server side button click method?

yes you can use something like control.PostBackUrl="~/reportPage.aspx" property.
but I think there is a better solution, using the original page add a textbox that contains your generated name and allow the user to change it if he wants to, then no need to make dialog, and if you want to inhance this you can add checkbox to enable reportname textbox or disable it "User differnet name:" for example

Featured Post

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

INTRODUCTION:
While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…

New Relic recently released its Synthetics product that allows for the creation of performance monitors that periodically test a site's performance. If you wish to test an interactive workflow New Relic employs Selenium WebDriverJS to run those test…

The purpose of this video is to demonstrate how to set up the WordPress backend so that each
page automatically generates a Mailchimp signup form in the sidebar.
This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…