This topic is locked
[SOLVED]

 Default values for DB

5/27/2010 1:13:58 PM
ASPRunner.NET General questions
M
Michaelr05 author

Just having a senior moment here...
For ASPrunner.Net, I want to set the default on a date field to the current date and set the ID adding the record to the userid field of the logged in user.
I know how to do it in ASP, can't get it working in .Net
Suggestions???
Thanks

Sergey Kornilov admin 5/31/2010

Current datetime: DateTime.Now

Current user: Page.Session["User"].UserName

M
Michaelr05 author 6/16/2010



Current datetime: DateTime.Now

Current user: Page.Session["User"].UserName


Yes this does work however it adds in the .cs file quotes before and after the sequence when building
defvalues["InDate"] = "DateTime.Now";
Any way to fix this on the build side so I don't need to manually edit every scrip[t.
Also, when adding additional fields to the database in "Modify Table" option, the field never shows up in any subsequent pages. I read the Drop and add the table response but is there any other way to do this so I don't lose all of my form changes?
Thank You.

Sergey Kornilov admin 6/17/2010

Try the following as a default value: (DateTime.Now)
Unfortunately ASPRunner.NET doesn't have synchronization capabilities. The only choice is to remove table and add it back.