I am a newbie to ASP and I am writing an ASP script, with the help of the tutorials on this website (thanks borg). I would like to be able to make some fields mandatory, so that if someone presses submit, then it will not allow them to continue if they dont enter any info. At the moment if you press submit, it will enter blank entries into the database, and I do not want this to happen.
This is the code that writes into the db, what do I need to add to make the fields mandatory.
rsAddAssets.AddNew
'Add a new record to the recordset rsAddAssets.Fields("FullName") = Request.Form("FullName") rsAddAssets.Fields("MachineMake") = Request.Form("MachineMake") rsAddAssets.Fields("MachineType") = Request.Form("MachineType") rsAddAssets.Fields("SerialNum") = Request.Form("SerialNum") rsAddAssets.Fields("AssetNum") = Request.Form("AssetNum") rsAddAssets.Fields("Location") = Request.Form("location") rsAddAssets.Fields("Notes") = Request.Form("Notes")
'Write the updated recordset to the database rsAddAssets.Update
|
Any ideas will be appreciated