B
buran
Dear ASP.NET Programmers,
Please consider the following code:
Private Sub dliStayDetails_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataListItemEventArgs) Handles
dliStayDetails.ItemDataBound
If e.Item.ItemType = ListItemType.EditItem Then
Dim deleteButton As LinkButton
deleteButton = CType(e.Item.FindControl("lnkDelDischarge"),
LinkButton)
End If
End Sub
I would like to call function whick deletes the contents of a textbox in
datalist edit mode. I wrote the following procedure but I don't have an idea
how to call it.
Sub ClearDischargeDate(ByVal sender As Object, ByVal e As
DataListItemEventArgs)
Dim txtDis As TextBox
txtDis = CType(e.Item.FindControl("txtDisDate"), TextBox)
txtDis.Text = ""
End Sub
Any suggestions? Thanks in advance,
Buran
Please consider the following code:
Private Sub dliStayDetails_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataListItemEventArgs) Handles
dliStayDetails.ItemDataBound
If e.Item.ItemType = ListItemType.EditItem Then
Dim deleteButton As LinkButton
deleteButton = CType(e.Item.FindControl("lnkDelDischarge"),
LinkButton)
End If
End Sub
I would like to call function whick deletes the contents of a textbox in
datalist edit mode. I wrote the following procedure but I don't have an idea
how to call it.
Sub ClearDischargeDate(ByVal sender As Object, ByVal e As
DataListItemEventArgs)
Dim txtDis As TextBox
txtDis = CType(e.Item.FindControl("txtDisDate"), TextBox)
txtDis.Text = ""
End Sub
Any suggestions? Thanks in advance,
Buran