hello!
because when you click the button it will postback to the server so you won't see the message.
change it to html input and you will get what you want,or you can use onclientclick property of the asp button and right a js function to do the alert.
Regards!
cocoll
Junior Poster in Training
66 posts since Jul 2010
Reputation Points: 10
Solved Threads: 1
<script lang="javascript">
function hello()
{
alert("Hello");
}
</script>
<asp:Button ID="Button1" runat="server" Text="Button" onclientclick="hello" />
Try this code
mani-hellboy
Junior Poster in Training
69 posts since Feb 2012
Reputation Points: 0
Solved Threads: 7