<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="JQuery.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('#btn').click(function () {
var isEqual = $('#txtbox').val() == $('#lstbox').val();
alert(isEqual ? "Same" : "different");
return false;
});
});
debugger;
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="btn" runat="server" Text="Compare" />
<asp:TextBox ID="txtbox" runat="server">
</asp:TextBox>
<br />
<asp:ListBox ID="lstbox" runat="server">
<asp:ListItem Text="aaaa" />
<asp:ListItem Text="bbbb" />
<asp:ListItem Text="cccc" />
</asp:ListBox>
</div>
</form>
</body>
</html>