I have an asp:ImageButton with a PostBackUrl into the same button (code behind) and I have to click twice in order to fire the internal code. I need to know how can I solve this issue just with one click. Please see code bellow.
<asp:ImageButton ID="imgButton" runat="server" ImageUrl="~/images/compose.gif" OnClick="imgButton_Click"/>
Code Behind:
protected void imgButton_Click(object sender, ImageClickEventArgs e)
{
this.imgButton.PostBackUrl = "http://www.externalSite.com/Entry.aspx";
//The internal code goes here... (this responds after second click).
}