Guys I have a issue in my code that I want to get value of html input type textboxes in javascript and assign value to hidden field.After that I want to used hidden field value in code behind file in c#, But hidden field always contains empty string Even if inputtype text boxes contain value.
My Java script:

```
 <script type ="text/javascript" >
        function myFunction() {
            var str1 = document.getElementById("amt3").value;
            var str2 = document.getElementById("amt4").value;
            document.getElementById("hf1").value = str1;
            document.getElementById("hf2").value = str2;
        }
    </script>

```

My HTML:

```
<div class="form-row row-fluid">
    <div class="span12">
        <div class="row-fluid">
            <label class="form-label span4" for="slider">
                Range slider</label>
            <div class="span8">
                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                <ContentTemplate >
                      <asp:HiddenField ID="hf1" runat="server" />
                      <asp:HiddenField ID="hf2" runat="server" />
                <div id="slider-range"    class="slider" >
                </div>
                <input type="text" id="amount1" style="border: 0; color: #ED7A53; font-weight: bold;
                    box-shadow: none;" />
                <input type="text" id="amt3" value="10" runat="server"     style="border: 0; color: #ED7A53; font-weight: bold;
                    box-shadow: none;" />
                <input type="text" id="amt4"  value="20" runat="server"    name="amt4" style="border: 0; color: #ED7A53;
                    font-weight: bold; box-shadow: none;" />
                    <asp:LinkButton ID="lnk" runat="server" onclick="lnk_Click" OnClientClick ="myFunction()">LinkButton</asp:LinkButton>
                    </ContentTemplate>
                </asp:UpdatePanel>

```