<p>I'm having a strange problem.</p>

<p>I have to use <code>GetPostBackEventRefence</code> to force a Postback, but it works the first time, after the first postback, the .NET function is not rendered... any ideas?</p>

<p>This is what I'm missing after the postback:</p>

<pre><code>&lt;script language="javascript" type="text/javascript"&gt;
&lt;!--
function __doPostBack(eventTarget, eventArgument) {
    var theform;
    if (window.navigator.appName.toLowerCase().indexOf("microsoft") &gt; -1) {
        theform = document.Main;
    }
    else {
        theform = document.forms["Main"];
    }
    theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
    theform.__EVENTARGUMENT.value = eventArgument;
    theform.submit();
}
// --&gt;
&lt;/script&gt;
</code></pre>

[{'answer_id': 50593, 'author': 'Haydar', 'author_id': 288, 'author_profile': 'https://Stackoverflow.com/users/288', 'pm_score': 3, 'selected': True, 'text': '<p>The first thing I would look at is whether you have any asp controls (such as linkbutton, comboboxes,that don\'t normally generate a submit but requre a postback) being displayed on the page. \n<strong>The __doPostback function will only be put into the page if ASP thinks that one of your controls requires it.</strong></p>\n\n<p>If you aren\'t using one of those you can use: </p>\n\n<pre><code>Page.ClientScript.GetPostBackClientHyperlink(controlName, "")\n</code></pre>\n\n<p>to add the function to your page</p>\n'}, {'answer_id': 50663, 'author': 'juan', 'author_id': 1782, 'author_profile': 'https://Stackoverflow.com/users/1782', 'pm_score': 2, 'selected': False, 'text': '<p>Well, following that idea I created a dummy function with the postbackreference, and it works... it still is weird though, because of it rendering correctly the first time</p>\n\n<pre><code>this.Page.RegisterClientScriptBlock("DUMMY", "&lt;script language=\'javascript\'&gt;function dummy() { " + this.Page.GetPostBackEventReference(this) + "; } &lt;/script&gt;");\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/50579', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1782/']