Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Add Method (String, DbType, String)

ParameterCollection.Add Method (String, DbType, String)

Creates a Parameter object with the specified name, database type, and default value, and adds it to the end of the collection.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public int Add(
	string name,
	DbType dbType,
	string value


Type: System.String

The name of the parameter.

Type: System.Data.DbType

The database type of the parameter.

Type: System.String

The default value for the parameter.

Return Value

Type: System.Int32
The index value of the added item.

This method is for database types. Use the Add(String, TypeCode, String) method for CLR types.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5 SP1, 3.0 SP2, 2.0 SP2
© 2015 Microsoft