I have used
<asp:CompareValidator ID="CompareValidator1" ValidationGroup="Date" ForeColor="Red"
runat="server" ControlToValidate="txt1" ControlToCompare="txt2" Operator="LessThan" ErrorMessage="start date must be greater than end Date"
Type="Date"> </asp:CompareValidator>
Now i Want to show the error message in alert box.