Datagrid button does not work in VS2005

Bill Humphrey

Active member
Joined
Apr 10, 2008
Messages
35
Programming Experience
Beginner
This code used to work in VS2003 but does not work in VS2005:

\\\\ This button is embedded in the datagrid and when clicked on would take a user to a new record page:

HTML:
<HeaderTemplate>

<asp:imagebutton toolTip="Add Patient Image" runat="server" imageurl="../images/icon_add.gif" ID="fBTNAddPatientImage"

CommandName="AddPatientImage" />

</HeaderTemplate>

\\\\ The CommandName when the button is clicked on would trigger the code behind method:

VB.NET:
Public Sub MaintainImaging_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dgImaging.ItemCommand

  If Trim(lcommandname) = "AddPatientImage" Then

  End If

 

End Sub

\\\\ This method is not being activated when the button is being clicked

Regards BH
 
Back
Top