Hi there.

I want to call a javascript fuction from the aspx.cs file. My code is as follows:

 fuction test () 
 // code goes here
    <form id="form1" runat="server">
    <div style="height: 318px">
        <asp:TextBox ID="textboxlogin" runat="server"></asp:TextBox>
        <br />
        <br />
        <asp:TextBox ID="textboxpassword" runat="server" TextMode="Password"></asp:TextBox>
        <br />
        <br />
        <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
        <br />
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
What I want to, is when the asp:button is clicked that fuction is called. I thought that the way to do it was to call the javascript fuction from the Button1_Click in the aspx.cs file but how do I do this?

I also tried doing

onclick="Button1_Click && test();"
but that didn't work. I'm using C#.

Any suggestions?