Form Builder Documentation

Form Field Options

Label - Sets the text that appears before the control in the form.

PK - Determines whether the field is a primary key. The form must have a primary key field set.

Visible - Determines whether the field appears in the form. If set to false, it will still appear in the markup, but as a hidden field.

Required - Determines whether a required field validator will appear alongside the control. Automatically set to true if the field does not allow nulls.

Enabled - Sets the "Enabled" attribute of the control.

Submit entry - Determines whether the value entered in the control will be submitted to the database.

Editor - Sets the type of control the field will use. Selecting "TextBox", "DropDownList" "RadioButtonList" or "Calendar" will cause new options to appear that are specific to those types of controls. Selecting "Calendar" will create a TextBox with an attached CalendarExtender. The CalendarExtender control requires that you have the ASP.NET Ajax Control Toolkit installed and referenced in the page, and also requires an ASP ScriptManager to be included in the page. For more information on the Ajax Control Toolkit, please visit this website.

Display order - Sets the order that this control will appear, relative to the other controls, in the generated markup.

Cellwidth - Sets the "Cellwidth" attribute of the control (TextBox and DropDownList only).

TextBox Options

Default value - Sets the "Text" attribute of the TextBox control.

Rows - Sets the "Rows" attribute of the TextBox control. A value greater than 1 will also cause the TextBox to enter MultiLine mode. It can therefore be used to control the depth of the resulting control.

DropDownList and RadioButtonList Options

DropDownList and RadioButtonList controls can be generated in two different ways. Either you can manually enter up to 10 ListItem objects to be added to the control, using the "Create manually" option, or you can add a SqlDataSource to the list. If you choose to use a SqlDataSource, it's assumed that you're using the same connection string - you can always edit this in the resulting markup.

If using the "Create from SQL" option, enter a SQL SELECT statement that returns two columns in the "SelectCommand" field. Enter the name of the column whose value you wish to appear in the list in the "DataTextField" field, and enter the name of the column whose value you wish to send to the database in the "DataValueField" field. You can also insert a blank item at the top of the list - this item will have a value of "" (empty string).

Calendar Options

Format - Sets the format of both the CalendarExtender and TextBox. If you wish to use a format not provided in the drop down, you can edit the markup later.

Supported SQL Data Types

Currently, the form builder only supports certain data types - these are datatypes that can be readily converted into form controls. Others, such as binary and image fields, unique identifiers and xml are not. Scripts containing these fields will still work fine, but the individual fields will be generated as hidden fields in the final markup. You can then freely edit that code to accomplish whatever you want to do with it.


  • char
  • varchar
  • nchar
  • nvarchar
  • text
  • ntext
  • bit
  • tinyint
  • smallint
  • int
  • bigint
  • decimal
  • numeric
  • smallmoney
  • money
  • float
  • real
  • datetime
  • datetime2
  • smalldatetime
  • date
  • time
  • datetimeoffset


  • binary
  • varbinary
  • image
  • timestamp
  • sql_variant
  • uniqueidentifier
  • xml
  • cursor
  • table

Using Your Markup

The markup generated by the Form Builder will contain an EditItemTemplate and an InsertItemTemplate, as well as a SqlDataSource and SelectParameters. You will need to supply these SelectParameters with a value for the primary key in your site's code.

Some controls and data types can cause errors to be raised if the databinder encounters a null value. This is just an unfortunate problem with ASP.NET - you may have to either remove the nulls from that column or find a workaround.

Please be aware that, by its nature, there is a massive number of possible anomalies that could occur in a script parser like this, and we just aren't able to account for all of them. This tool is mainly intended as a shortcut - it's entirely possible that your markup will take some amount of manual editing before it starts to function as intended. Having said that, though, if you do encounter an issue that you think requires our attention, please let us know using the comment form.

The ASP.NET Form Builder may not be compatible with older browsers.

If you found our ASP.NET form generator useful, please consider making a small donation. It helps us continue to improve the site and add new features. Eventually we plan to add a load more coding tools just like this one!


We'd also love to hear about your experience using our code generation tools. Use the form below to leave a comment for us.

Let us send you updates about via email