Hi Friend Try this.....
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
function ShowDia() {
var msg = document.getElementById("<%=txtMessage.ClientID %>").value;
alert(msg);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
Enter the Message :
<asp:TextBox ID="txtMessage" runat="server"></asp:TextBox>
<asp:Button ID="btnShowDialog" runat="server" Text="Show Dialog" OnClientClick="ShowDia();" />
</div>
</form>
</body>
</html>