Prevent LinkButton Command from firing on refresh

I have a LinkButton in a Grid on a page to fire an event.

<asp:LinkButton ID="LinkButton1" CommandName="Select" CommandArgument='<%# Bind("ID") %>' runat="server" OnCommand="LinkButton1_Command">Action</asp:LinkButton>
               
Which works fine when the user presses the button

How do I stop the the command from firing when the page is refreshed?

LVL 2
phunchakAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sagirCommented:
You mean don't allow it to be pressed again once it for pressed for the first time?
0
phunchakAuthor Commented:
I want to allow it to be pressed again....I just don't want it firing when the user refreshes the page.
0
phunchakAuthor Commented:
I found my own solution.  (I was using the command to run a javascript popup)]

After the execution on the server side from LinkButton1_Command, I redirect with a QueryString like,

private void redirect()
{

Response.Redirect("default.aspx?q=success");

}

And if Page_Load event check, if QueryString q = "success" then  I  run any JavaScriptUtilities.PopUp functions.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.