The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!
<script type="text/javascript">
function showName() {
alert('hello ' + document.getElementById("TextBox1").value);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script language="javascript" type="text/javascript">
function showName() {
alert('hello ' + document.getElementById("<%=TextBox1.ClientID%>").value);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
Please enter your name:<br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="OK" OnClientClick="return showName();" />
</div>
</form>
</body>
</html>
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
<script language="javascript" type="text/javascript">
function showName() {
alert('hello ' + document.getElementById("<
}