Most of the examples related to ribbon button actions involve opening dialog. However, if you need to send post back request to the same page/dialog where the ribbon exists, you need to trick a bit. Let’s explain how you can do so.
Define Ribbon XML
<CommandUIHandlerFigure 1: PostBack action defined in Ribbon xml
Identify the PostBack request in the page
The second step is to identity from code behind file, if the postback occurred from ribbon button’s action. From the page load, you can check if the postback occurred due to the command “MyButton.Command”. To do so we can have a check shown below in the page load method.
if (Page.Request["__EVENTTARGET"] == "MyButtonPostback")
//The ribbon button initiated the postback
Though this is very simple trick but might be helpful for someone.