newbie inserting record question
am 26.01.2008 21:38:28 von merrittrso I am trying to insert asp:textbox in a asp:table how do I use the
sqldatasource insertCommand to get this don. I tried this in the code
behind with no luck
protected void Button1_Click(object sender, EventArgs e)
{
SqlDataSource1.Insert();
}:
ConnectionString="<%$
ConnectionStrings:InventoryConnectionString %>"
InsertCommand="INSERT INTO [Assets] ([Agency_ID], [Asset_Tag],
[Serial_Number], [Type], [SubType], [Mfg], [Model], [Description],
[Purchase_Date], [Purchase_Cost], [Acquisition_Type], [Disposal_Date],
[Disposal_Reason], [CPU], [MIPS_or_Mhz], [Capacity], [Asset_ID],
[Warranty_End_Date], [Maintenance_End_Date], [Maintenance_Cost],
[Asset_Name], [OS_Version], [Org], [Physical_Address], [City],
[Notes]) VALUES (@Agency_ID, @Asset_Tag, @Serial_Number, @Type,
@SubType, @Mfg, @Model, @Description, @Purchase_Date, @Purchase_Cost,
@Acquisition_Type, @Disposal_Date, @Disposal_Reason, @CPU,
@MIPS_or_Mhz, @Capacity, @Asset_ID, @Warranty_End_Date,
@Maintenance_End_Date, @Maintenance_Cost, @Asset_Name, @OS_Version,
@Org, @Physical_Address, @City, @Notes)"
OldValuesParameterFormatString="original_{0}"
SelectCommand="SELECT * FROM [Assets]"
Width="411px" Visible="true" >
:
:
:
:
:
:
:
:
:
:
:
:
:
: