English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i have asp.net form with some data on datagrid, i have written
ondeletecommnad event of datagrid to remove single row data
it works fine
but the problem is whenever i delete record from last row of datagird on ondeletecommnad event , it fires, then i refresh browser either by f5 or button, then event does not fires again

But whenever i delete record from any row except than last row of datagird on ondeletecommnad event , it fires, then i refresh browser either by f5 or button, then event again fires

I checked it by Debugging the application

2007-01-10 21:52:00 · 1 answers · asked by googsoft 1 in Computers & Internet Programming & Design

1 answers

In the first line of your page load, try this:

If NOT Postback then

with the END IF at the end of the page load.

It should only run the event the first time you hit the page in a Session. If you hit it again or 'post back' to the same page the IF statement skips that event.

2007-01-14 15:34:09 · answer #1 · answered by rod 6 · 0 0

fedest.com, questions and answers