Hello
I have a image button with an OnClick event that calls this method "imgPresupuestos_Click" and a property PostBackUrl with this value "www.gmail.com". When i click the image button i want to insert a value on a database (and i have a method called insert) before open the gmail web page, but only redirect to the gmail page and don't insert.
Please help
Onclick event
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Vimal KandasamyRank #2,151 · 661 reputationPosted Apr 2, 2009, 8:03 PM EDT
if you want to redirect to gmail after insert,then dont use PostBackUrl property...
Simply call your insert method in "imgPresupuestos_Click"
after that add
Response.Redirect("http://www.gmail.com"); in imgPresupuestos_Click"..
it will insert first then redirect.. i think it will help you...