Setting a session variable before AutoPostBack fires in an asp:Button
===

How would I go about setting a session variable from the click of an ASP:Button before an AutoPostBack event fires.

Here is what I have right now, but I'm not exactly sure I'm doing this right:

     <asp:Button ID="CommitBTN" runat="server" PostBackUrl="~/MMR_Home.aspx" 
     onclick="CommitBTN_Click" UseSubmitBehavior="true" 
     OnClientClick='<% string temp1 = "true"; Session["ClickedFlag"] = temp1; %>' Text="Commit Changes to Database" />

Would this be the correct way of performing this action or am I going at it completely wrong?