ietprofessional
Programmer
Hello Everyone,
I'm using a datalist on a form. I'm comfortable using a datalist as a editing tool, by using the itemtemplate and edittemplate. The user could go to an item click a button (with editcommand) that executes the edit command and the datalist goes to the edittemplate allowing the user to edit data:
What I want to do is start the page in edit mode\display the edittemplate and when the user clicks the add button it would display the itemtemplate.
My problem is how do I get the object and datalistcommandeventargs passed to the dlMember_EditCommand function on pageload?
Thanks!
I'm using a datalist on a form. I'm comfortable using a datalist as a editing tool, by using the itemtemplate and edittemplate. The user could go to an item click a button (with editcommand) that executes the edit command and the datalist goes to the edittemplate allowing the user to edit data:
Code:
Private Sub dlMember_EditCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Handles dlMember.EditCommand
dlMember.EditItemIndex = e.Item.ItemIndex
fillDataList()
End Sub
What I want to do is start the page in edit mode\display the edittemplate and when the user clicks the add button it would display the itemtemplate.
My problem is how do I get the object and datalistcommandeventargs passed to the dlMember_EditCommand function on pageload?
Thanks!