This helps to find the name of control that caused postback in pageload.This helped me.Hope this helps someone else too
<asp:Button ID="Button1" runat="server" Text="Button"
OnClientClick = "SetSource(this.id)" />
<asp:ImageButton ID="ImageButton1" runat="server"
OnClientClick = "SetSource(this.id)" />
<script type = "text/javascript">
function SetSource(SourceID)
{
var hidSourceID =
document.getElementById("<%=hidSourceID.ClientID%>");
hidSourceID.value = SourceID;
}
</script>
on code behind you can get the ID of the function using :
if (IsPostBack)
{
string CtrlID = string.Empty;
if (Request.Form[hidSourceID.UniqueID] != null &&
Request.Form[hidSourceID.UniqueID] != string.Empty)
{
CtrlID = Request.Form[hidSourceID.UniqueID];
}
}