DataList
-
How to add and configure TextBox in Item template datalist controls for update the rows....Please send a HTML Coding
With Regards, Samson
hi see this code template Protected Sub DataList1_UpdateCommand(ByVal source As Object, _ ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Dim categoryID As String = _ DataList1.DataKeys(e.Item.ItemIndex).ToString() Dim categoryName As TextBox = _ CType(e.Item.FindControl("textCategoryName"), TextBox) Dim description As TextBox = _ CType(e.Item.FindControl("textDescription"), TextBox) SqlDataSource1.UpdateParameters("original_CategoryID"). _ DefaultValue = categoryID SqlDataSource1.UpdateParameters("categoryName"). _ DefaultValue = categoryName.Text SqlDataSource1.UpdateParameters("Description"). _ DefaultValue = description.Text SqlDataSource1.Update() DataList1.EditItemIndex = -1 DataList1.DataBind() End Sub