title: how to call a javascript function using asp.net?
body: <p>This is what i m trying. calling the function of the inline js. but i didn't working.   </p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="javascript_Tutorials.WebForm1" %&gt;
  
      &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
      &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
      &lt;head runat="server"&gt;
          &lt;title&gt;javaScript Tutorials&lt;/title&gt;
          &lt;script type="text/javascript" language="javascript"&gt;
              function objects() {
                  alert("Well come");
              }
          &lt;/script&gt;
  
      &lt;/head&gt;
      &lt;body&gt;
          &lt;form runat="server" id="myform"&gt;
          &lt;asp:Button onclick="&lt;% objects(); %&gt;" runat="server"  /&gt;
          &lt;/form&gt;
  
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>and have the following error:</p>
  
  <p><strong>CS1061: 'ASP.webform1_aspx' does not contain a definition for 'objects' and no extension method 'objects' accepting a first argument of type 'ASP.webform1_aspx' could be found (are you missing a using directive or an assembly reference?)</strong></p>