0

i need to fire html buttom after the end of my asp.net c# code

 <asp:Button ID="Button3" runat="server" 
        Text="Button" onclick="Button3_Click" />

<input id="Button2" type="button" value="button" data-type="error" class="growl-type2" runat="server" />

and cs code is

 protected void Button3_Click(object sender, EventArgs e)
    {
        ----



      i need to fire button2( automatically) in this position
    }
2
  • does button2 not have a button_click2 method you could call? Commented Apr 4, 2014 at 9:01
  • Refer the accepted answer here forums.asp.net/t/… Commented Apr 4, 2014 at 9:05

1 Answer 1

1

Button clicks are just handled events. To fire a button click you simply need to raise the correct event.

You'll need something like: Button2_Click(sender, e)

Alternatively, you can inject some Javascript into the page, which reacts directly to the click of button3 or is caused by the click of button3 and causes the click of button2 through something like: document.getElementById('Button2').click()

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.