Clearing hidden input fields after postback
<p>I use hidden input fields to pass values form my javascript to the code behind. This works great but when I try to clear the fields from the code behind this doesn't work.</p>

<pre><code>&lt;input type="hidden" id="iRowNumberTblOne" name="iRowNumberTblOne" value="" runat="server"/&gt;
</code></pre>

<p>I tired to do it by a few ways but they all don't work.</p>

<p>This is the easiest way and most logic but it doens't want to clear the values </p>

<pre><code>iRowNumberTblOne.Value = "";
</code></pre>

<p>I even made a javascript, so the values would be cleared on the client side.
The alert comes up the first time "at startup" but after a postback it seems like the code behind doesn't find the javascript again.</p>

<pre><code>&lt;script type="text/javascript"&gt;
        function clearInputFileds() {
        alert('test');
            document.getElementById("ctl00_contentHolder_iSiteAlias").value = "";
            document.getElementById("ctl00_contentHolder_iServiceName").value = "";
            document.getElementById("ctl00_contentHolder_iRowNumberTblOne").value = "";
            document.getElementById("ctl00_contentHolder_iRowNumberTblTwo").value = "";

        }


    &lt;/script&gt;
</code></pre>

<p>This is the code I use in the codebehind</p>

<pre><code>Page.ClientScript.RegisterStartupScript(GetType(), "", "clearInputFileds();", true);
</code></pre>

<p>Do you have any idea why these methods doesn't work? Maybe know a better way to clear this fields?</p>

<p>EDIT:</p>

<p>The input fields get filled by a javascript function. <strong>This</strong> function gets runs onClick.</p>

<pre><code>function setClickedValues(siteAlias, serviceName, rowNumberTblOne, rowNumberTblTwo) {
            document.getElementById("ctl00_contentHolder_iSiteAlias").value = siteAlias;
            document.getElementById("ctl00_contentHolder_iServiceName").value = serviceName;
            document.getElementById("ctl00_contentHolder_iRowNumberTblOne").value = rowNumberTblOne;
            document.getElementById("ctl00_contentHolder_iRowNumberTblTwo").value = rowNumberTblTwo;

        }
</code></pre>
