0

I have a web project with some forms in it. Every user on my web project should get an empty form ready to fill for everyday.

Is there anyway to Create a simple empty form with only id, name, activity fields, all automatically done by server everyday in MVC?

It can be timer that watches system time and creates a new form when a new day beguns or it can be another trick that i cant even think of.

Just show me ways to create forms every new day automatically.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Berker Yüceer
  • 7,026
  • 18
  • 68
  • 102
  • 1
    Why do you want to create new forms? Why not let them go to a single page and fill out a form multiple times? – jrummell Nov 14 '12 at 15:42
  • @jrummell cause its about daily notification of activities. everyday my users must apply this form.. even if they didnt do any activities. its also about showing which days are mostly left empty and also making "old" empty forms seen by admin. – Berker Yüceer Nov 14 '12 at 15:47
  • So by "form", you actually mean rows in a database that are displayed in a web form, right? – jrummell Nov 14 '12 at 15:49
  • @jrummell exactly! and i also wanna see if its possible to create daily actions. – Berker Yüceer Nov 14 '12 at 15:50

2 Answers2

2

Why not just check if a form has already been submitted by the user on that day and display the form if they haven't. You could hold the date in a hidden field on the form

Matt Nolan
  • 113
  • 7
1

Implementing scheduled tasks in ASP.NET is hard. If your only goal is to create new rows in a database table, use a SQL Server Job (assuming you have SQL Server).

If it's more complex than that (sending email, for example), you have a few options presented in the answers in the linked question. I would typically create a simple console application and schedule it with the Windows Task Scheduler, but it depends on the scope of the task.

Community
  • 1
  • 1
jrummell
  • 42,637
  • 17
  • 112
  • 171