I am trying to make my website update its text in realtime (or periodically), but i have had no luck so far. I am quite unexperienced with HTML, and thus i have no idea what to do. I am currently getting an often changing global string which i put into my Textbox, but the only way i managed to get the box to update is by making a button calling an empty event. Using a timer in my behind to constantly call the event didn't work.

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

    <asp:Button ID="Start" runat="server" Text="Start" OnClick="Program_Start" />
    <asp:Button ID="Refresher" runat="server" OnClick="Refresh" Text="Refresh text" />
    <input type="Text" name="textin" placeholder="Input" data-toggle="tooltip" id="textin" runat="server" />
    <asp:Button ID="submit_button" runat="server" OnClick="Submit_button" Text="Submit" UseSubmitBehavior="true" />
    <br />
    <asp:Literal runat="server" ID="textout" />
        $(document).ready(function () {
            $(window).keydown(function (event) {
                if (event.keyCode == 13) {
                    return false;
            var intervalID = setInterval(document.getElementById("Refresher").click(), 50);

Related posts

Recent Viewed