calling javascript from codebehind or dopastback in javascript
<p>i have a button1_click() function which runs on page load,,now i want to call this function from javascript,,for that purpose i need to do dopostback in javascript,,can nyone tell how can i do that..as u can see my pageload function that button1_click() runs on postback</p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
{
  if (!IsPostBack)
     {
      int l = files.Length;
      Button1.Attributes.Add("onclick", " alertMe("+ l.ToString() +");");
      }
  Button1_Click();

}
</code></pre>

<p>my javascript code :</p>

<pre><code>function alertMe(len) 
 {
if(len&gt;3)
//do postback(post back will run Button1_click function)
 else
 alert('Hello');
 }
</code></pre>
