I have been through 4hrs of posts now. I can not get this js code to work. This is the latest iteration, I have tried many combinations.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebFormRedisTest.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
function updateText(strData) {
debugger;
document.getElementById("<%=lbl.ClientID%>").innerHTML(strData);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Test_OnClientClick"/>
<div>
</div>
<asp:Label ID="lbl" runat="server" Text="Label" ClientIDMode="Static"></asp:Label>
</form>
</body>
</html>
public void Test_OnClientClick(object sender, EventArgs e)
{
Console.WriteLine("test");
ScriptManager.RegisterStartupScript(this, this.GetType(), "updateText", "updateText('test');", true);
}