Onclick not firing

I have a set of buttons on my master page (I have attached the code below) but no onclick event is being raised. I pulled the final page source and no onclick event was present.

What am I not doing?
<asp:Button ID="btnSubmit" CssClass="btn" runat="server" OnClick ="Button_Click" />
<asp:Button ID="btnSave" CssClass="btn" CommandArgument="1" CommandName="ButtonPress" runat="server" OnClick="Button_Click" />
<asp:Button ID="btnClear" CssClass="btn" CommandArgument="8" CommandName="ButtonPress" runat="server" OnCommand="Button_Command" />
<asp:Button ID="btnCancel" CssClass="btn" CommandArgument="4" CommandName="ButtonPress" runat="server" OnCommand="Button_Command" />

--Master Code Behind
Protected Sub Button_Command(ByVal sender As Object, ByVal e As CommandEventArgs) Handles btnCancel.Command, btnClear.Command
    Session("ButtonClicked") = e.CommandArgument
End Sub
Protected Sub Button_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSave.Click, btnSubmit.Click
    Session("ButtonClicked") = CType(sender, Button).CommandArgument
End Sub

--Page Source
<input type="submit" name="ctl00$btnSubmit" value="Submit" id="ctl00_btnSubmit" class="btn" />
<input type="submit" name="ctl00$btnSave" value="Save" id="ctl00_btnSave" class="btn" />
<input type="submit" name="ctl00$btnClear" value="Clear" id="ctl00_btnClear" class="btn" />
<input type="submit" name="ctl00$btnCancel" value="Cancel" id="ctl00_btnCancel" class="btn" />

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Do you want a Client side script or a server side script call?

If you want a client side script, just add onclick="function_name()" in the object.
If  you wanna add it for client side use this

eg :

 <script type="text/javascript">
   function foo()


    <form runat="server">
        <asp:Button ID="Test" Text="Click Me" runat="server" />

  protected void Page_Load(object sender, EventArgs e)
        Test.Attributes.Add("onclick", "javascript:return foo();");


things will be okay
you wanna make the server call ??
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

rufassaAuthor Commented:
I want a normal postback, a server call
rufassaAuthor Commented:
The problem I am having is that it seems as if I am doing everything right yet not getting the desired results. I am currently doing exactly what is being said in this link.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rufassaAuthor Commented:
I set the PostBackURL property as the last comment suggested and the button started to fire but I got the following error as it fired.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.