• Will be jump starting this project again **

I Will be updating to .net 4.5.x and adding HTML5 features to the generated forms, along with CSS style sheets to make it easier to customize.

This is a simple data form wizard to help speed up asp.net web page development.

It allows a connection to a MS SQL 2005 -2008 Database. You are then provided a list of available database to choose from, next you are offered a list of tables in the selected database. Finally you can create an insert record form comparable with Asp.Net 2.0 and above.

The application assumes the following:

Primary key Fields are ID/ Auto-Number fields and will not be added to the form.

For fields marked as "not null", the application adds validation to the form.

This project is in ALPHA.

Todo:
  • Add the Submit portion (T-Sql Insert into command) - Done
  • add the Edit Record portion
  • add the Delete Record portion
  • Add more user configurations to customize the output. - Done
  • Make this a VS 2012 Plug-In


New Information:

The new code makes basic assumptions when it comes to the naming of database fields.

Naming field names in the database should be done this way

cBusinessName or pUserName or c_ID

The application will strip off the first 2 left characters from the field name.
Next it will replace all underscore ( _ ) characters with spaces.
What is left is what is used for the labels, so cBusinessName becomes "Business Name"
If what is left is "ID" it assumes a key or pointer to another table record and excludes it from the form, it also adds to the page load the following code to ensure a value was passed:

Sample code where the field name is c_ID

If Not Page.IsPostBack Then
If Request.Params("cId") Is Nothing And Session("cId") Is Nothing Then
Response.write("Missing required information")
Else
If Session("cId") Is Nothing Then Session("cId") = Request.Params("c_Id")
End If
Else
End If

This allows for sessions or url variable passing.

Primary Key Fields are never added to the form

Any Field where null's are NOT allowed become required on the form.

I have added functions to the code to allow for custom head and foot html.

"Int32", "Int64", "Decimal", "Boolean" data types are passed without single quotes, all others get quoted in the VALUES portion of the insert T-Sql command.

Example : Sql = "Insert Into Assignments (cId,aName) VALUES(" & Session("cId") & ",'" & aName.text & "');"

Thats all for now.

Last edited May 22, 2014 at 4:20 PM by Markap, version 6