How to save an Onclick event on Page_Unload to use in Page_Load

Joined
Oct 26, 2005
Messages
3
Reaction score
0
Hey

I need to do the following:
I have a page with a grid and some modification buttons (add, edit delete)
I hooked up some Javascript to get the row on wich the user click to be able to edit or delete that row.

What my problem now is, that if the user didnt click on a row and hit the update/delete button.

I have some error checking in the OnClick events, but the buttons perform a postback and I do not
reload my grid if it is a PostBack.

My grid is black when the user didnt click on a button and the postback happens. I am able to display my error message, but the grid is no longer there.

I cannot put anything in the OnClick event to show the grid, because of the way ASP.Net handles events.

Is there a way how I can save a value in the Session object that represents the button that was clicked?
I want to use this method to put a check in the Page_load to know whether I must repopulate my grid or not.
I am trying to hook this up in the Page_Unload event.

Thnx in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top