Convert the
Asp:Button
into an
Asp:LinkButton
. It will work.
That is:
<asp:LinkButton ID="getDetails" runat="server" Text="Send Enquiry" CommandName="SendEnquiry" Font-Names="verdana" Font-Size="8pt" Height="20px" Width="90px" />
Or, you have to use the
UseSubmitBehavior="false"
property for the
Asp:Button
, to make it work. That is:
<asp:Button ID="getDetails" runat="server" Text="Send Enquiry" UseSubmitBehavior="false" CommandName="SendEnquiry" Font-Names="verdana" Font-Size="8pt" Height="20px" Width="90px" />
The reason is, by default an
Asp:Button
renders an Submit button and
DataList
doest not work if the button has a Submit behaviour. So, you need to mark the
UseSubmitBehavior="false"
Good luck :)