how to add a warning to DeleteCommand of gridview?

Discussion in 'ASP .Net Web Controls' started by Averell, May 29, 2006.

  1. Averell

    Averell Guest

    Hi,

    I made a gridview with VWD. The gridview has the Delete button set
    (ShowDeleteButton="True" in the <asp:CommandField>).
    It works perfect, but i would like to add a warning before the record is
    deleted to prevent deleting a wrong record.
    I did this in the code-behind file:
    Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As
    System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles
    GridView1.RowDeleting
    Dim jv As String
    jv = "<script language='javascript'>" _
    & " alert('beware!');" _
    & "if (! confirm('if you want to delete it, click on OK'));" _
    & " {window.location.href='mult.aspx'};" _
    & "</script>"
    Response.Write(jv)
    End Sub

    I see effectively the warning, but when i click on OK or on Cancel of the
    Confirm, in both cases the record is deleted.
    Is it possible to prevent that, and if yes, how?

    Thanks for any hints
    Averell
     
    Averell, May 29, 2006
    #1
    1. Advertising

  2. Averell

    PeterKellner Guest

    On Mon, 29 May 2006 19:00:07 +0200, "Averell" <> wrote:

    >Hi,
    >
    >I made a gridview with VWD. The gridview has the Delete button set
    >(ShowDeleteButton="True" in the <asp:CommandField>).
    >It works perfect, but i would like to add a warning before the record is
    >deleted to prevent deleting a wrong record.
    >I did this in the code-behind file:
    >Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As
    >System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles
    >GridView1.RowDeleting
    > Dim jv As String
    > jv = "<script language='javascript'>" _
    > & " alert('beware!');" _
    > & "if (! confirm('if you want to delete it, click on OK'));" _
    > & " {window.location.href='mult.aspx'};" _
    > & "</script>"
    > Response.Write(jv)
    >End Sub
    >
    >I see effectively the warning, but when i click on OK or on Cancel of the
    >Confirm, in both cases the record is deleted.
    >Is it possible to prevent that, and if yes, how?
    >
    >Thanks for any hints
    >Averell
    >
    >


    You need to return the results of confirm.
    Peter Kellner
    http://peterkellner.net
     
    PeterKellner, May 29, 2006
    #2
    1. Advertising

  3. Averell

    Bob Guest

    Peter, i made a function and returned the confirm result, but even clicking
    on Cancel, the record is deleted ...
    I inserted an ALERT after the 'return false' and it's not executed. The Java
    code stops indeed, but not the VB code deleting the row.

    Is this the right way to proceed?
    thanks


    Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As
    System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles
    GridView1.RowDeleting
    Dim jv As String
    jv = "<script language='javascript'>" _
    & "function check()" _
    & "{" _
    & " alert('let op');" _
    & " var ok=confirm('if you want to delete it, click on OK');" _
    & " if (!ok)" _
    & " {" _
    & " window.location.href='mult.aspx';" _
    & " return false;" _
    & " alert('this is not shown');" _
    & "};" _
    & "};" _
    & "check();" _
    & "</script>"
    Response.Write(jv)
    End Sub

    "PeterKellner" <> wrote in message
    news:...
    > On Mon, 29 May 2006 19:00:07 +0200, "Averell" <> wrote:
    >
    > >Hi,
    > >
    > >I made a gridview with VWD. The gridview has the Delete button set
    > >(ShowDeleteButton="True" in the <asp:CommandField>).
    > >It works perfect, but i would like to add a warning before the record is
    > >deleted to prevent deleting a wrong record.
    > >I did this in the code-behind file:
    > >Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As
    > >System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles
    > >GridView1.RowDeleting
    > > Dim jv As String
    > > jv = "<script language='javascript'>" _
    > > & " alert('beware!');" _
    > > & "if (! confirm('if you want to delete it, click on OK'));" _
    > > & " {window.location.href='mult.aspx'};" _
    > > & "</script>"
    > > Response.Write(jv)
    > >End Sub
    > >
    > >I see effectively the warning, but when i click on OK or on Cancel of the
    > >Confirm, in both cases the record is deleted.
    > >Is it possible to prevent that, and if yes, how?
    > >
    > >Thanks for any hints
    > >Averell
    > >
    > >

    >
    > You need to return the results of confirm.
    > Peter Kellner
    > http://peterkellner.net
     
    Bob, May 30, 2006
    #3
  4. Averell

    olrt Guest

    You should look the example at :
    ms-help://MS.VSExpressCC.v80/MS.NETFramework.v20.en/dv_aspnetcon/html/2c688b1a-93a4-4dad-b82b-63974bdbb13e.htm

    Then you might paste the code of Page_Load into your Row_Deleting event
    handler.
    Don't forget to Cancel delete by default !!
     
    olrt, May 30, 2006
    #4
  5. Averell

    NumbLock Guest

    "olrt" <> wrote in
    news::

    > ms-help://MS.VSExpressCC.v80/MS.NETFramework.v20.en/dv_aspnetcon/html/2
    > c688b1a-93a4-4dad-b82b-63974bdbb13e.htm


    Check out this site:

    http://www.codeproject.com/aspnet/NingLiangSimpleControl.asp

    Ning Liang packaged up some javascript into a web control that will
    return the results of it's confirm action in the request.form. You can
    trap the delete button event, call the msgbox1.confirm function and trap
    for the form variable in the load or prerender event since the
    msgbox1.confirm does a postback.



    --
    *~!NumbLock!~*
     
    NumbLock, May 30, 2006
    #5
  6. Averell

    olrt Guest

    With VWD 2005, I've the following message when I click to continue :

    -----------------------------------------------------------------8<-------------------------------------------------------
    Invalid postback or callback argument. Event validation is enabled
    using <pages enableEventValidation="true"/> in configuration or <%@
    Page EnableEventValidation="true" %> in a page. For security purposes,
    this feature verifies that arguments to postback or callback events
    originate from the server control that originally rendered them. If
    the data is valid and expected, use the
    ClientScriptManager.RegisterForEventValidation method in order to
    register the postback or callback data for validation.
    -----------------------------------------------------------------8<-------------------------------------------------------
     
    olrt, May 30, 2006
    #6
  7. Averell

    Guest

    What Peter Kellner means is that you need to inject some clientside
    javascript when you're creating your delete button and return the
    results of the Confirm.
    In this scenario the RowDeleting serverside event would not even fire
    if the user clicks Cancel because the delete click would be cancelled
    on the clientside.

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/GridViewEx10.asp
    Do a search on the word 'OnClientClick' and you can see some specific
    code on delete confirmation.

    Regards,
    Andy
     
    , May 30, 2006
    #7
  8. Averell

    Averell Guest

    Hi, i'm a little confused with all those solutions. Meanwhile i did this and
    i feel i'm close to the solution (??).
    The only thing i miss is how to pass the result of the function check() to
    VB.
    Thanks

    Dim jv As String
    jv = "function check()" _
    & "{" _
    & " alert('warning');" _
    & " var ok=confirm(if you want to delete; click on OK');" _
    & " if (!ok)" _
    & " {" _
    & " window.location.href='mult.aspx';" _
    & " return false;" _
    & "};" _
    & "};" _
    & "check();"

    Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "myscript", jv,
    True)

    dim x as string
    x= result of function check() : HOW TO DO THIS?
    if x="False" then e.cancel=True


    <> wrote in message
    news:...
    > What Peter Kellner means is that you need to inject some clientside
    > javascript when you're creating your delete button and return the
    > results of the Confirm.
    > In this scenario the RowDeleting serverside event would not even fire
    > if the user clicks Cancel because the delete click would be cancelled
    > on the clientside.
    >
    >

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/GridViewEx10.asp
    > Do a search on the word 'OnClientClick' and you can see some specific
    > code on delete confirmation.
    >
    > Regards,
    > Andy
    >
     
    Averell, May 31, 2006
    #8
  9. ASP.NET20: Simple gridview ex. with del. confirm:

    http://www.hellobasic.com/cgi-bin/forum/YaBB.pl?board=dotnet;action=display;num=1137191330



    "Averell" <> schreef in bericht
    news:...
    > Hi, i'm a little confused with all those solutions. Meanwhile i did this
    > and
    > i feel i'm close to the solution (??).
    > The only thing i miss is how to pass the result of the function check() to
    > VB.
    > Thanks
    >
    > Dim jv As String
    > jv = "function check()" _
    > & "{" _
    > & " alert('warning');" _
    > & " var ok=confirm(if you want to delete; click on OK');" _
    > & " if (!ok)" _
    > & " {" _
    > & " window.location.href='mult.aspx';" _
    > & " return false;" _
    > & "};" _
    > & "};" _
    > & "check();"
    >
    > Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "myscript", jv,
    > True)
    >
    > dim x as string
    > x= result of function check() : HOW TO DO THIS?
    > if x="False" then e.cancel=True
    >
    >
    > <> wrote in message
    > news:...
    >> What Peter Kellner means is that you need to inject some clientside
    >> javascript when you're creating your delete button and return the
    >> results of the Confirm.
    >> In this scenario the RowDeleting serverside event would not even fire
    >> if the user clicks Cancel because the delete click would be cancelled
    >> on the clientside.
    >>
    >>

    > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/GridViewEx10.asp
    >> Do a search on the word 'OnClientClick' and you can see some specific
    >> code on delete confirmation.
    >>
    >> Regards,
    >> Andy
    >>

    >
    >
     
    Edwin Knoppert, May 31, 2006
    #9
  10. Averell

    olrt Guest

    olrt, May 31, 2006
    #10
  11. Averell

    Guest

    I finally see where the confusion comes from.
    The return we are talking about is not a return to the serverside code
    but to the button's click event. So cancel will cancel the click event
    while a confirm will continue with the click which would then go onto
    trigger a postback to the server.

    Take a look at Edwin's code in this thread to see a complete example of
    this in action.
    My only suggestion is that the line below can be simplified within
    Default2.aspx.vb:
    If b IsNot Nothing Then b.Attributes.Add("onclick",
    "javascript:window.event.returnValue=confirm('Delete?');")

    to:
    If b IsNot Nothing Then b.OnClientClick = "return confirm('Delete?');"

    Regards,
    Andy

    ps. If you are still resistant to this simple solution then you can use
    javascript to write the value of your ok variable to a hidden field in
    the page and check this hidden field on the postback.

    Averell wrote:
    > Hi, i'm a little confused with all those solutions. Meanwhile i did this and
    > i feel i'm close to the solution (??).
    > The only thing i miss is how to pass the result of the function check() to
    > VB.
    > Thanks
    >
    > Dim jv As String
    > jv = "function check()" _
    > & "{" _
    > & " alert('warning');" _
    > & " var ok=confirm(if you want to delete; click on OK');" _
    > & " if (!ok)" _
    > & " {" _
    > & " window.location.href='mult.aspx';" _
    > & " return false;" _
    > & "};" _
    > & "};" _
    > & "check();"
    >
    > Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "myscript", jv,
    > True)
    >
    > dim x as string
    > x= result of function check() : HOW TO DO THIS?
    > if x="False" then e.cancel=True
    >
    >
    > <> wrote in message
    > news:...
    > > What Peter Kellner means is that you need to inject some clientside
    > > javascript when you're creating your delete button and return the
    > > results of the Confirm.
    > > In this scenario the RowDeleting serverside event would not even fire
    > > if the user clicks Cancel because the delete click would be cancelled
    > > on the clientside.
    > >
    > >

    > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/GridViewEx10.asp
    > > Do a search on the word 'OnClientClick' and you can see some specific
    > > code on delete confirmation.
    > >
    > > Regards,
    > > Andy
    > >
     
    , May 31, 2006
    #11
  12. I never understood the differences myself.
    For my code i was looking for a simple click-abort (on no, abort), that's
    all..
    However afaik at that time the return statement itself was insufficient
    somehow and still produced a round-trip??

    I forgot what exactly happend at that time, maybe someone can shed some
    light on these differences?

    Thanks,



    <> schreef in bericht
    news:...
    >I finally see where the confusion comes from.
    > The return we are talking about is not a return to the serverside code
    > but to the button's click event. So cancel will cancel the click event
    > while a confirm will continue with the click which would then go onto
    > trigger a postback to the server.
    >
    > Take a look at Edwin's code in this thread to see a complete example of
    > this in action.
    > My only suggestion is that the line below can be simplified within
    > Default2.aspx.vb:
    > If b IsNot Nothing Then b.Attributes.Add("onclick",
    > "javascript:window.event.returnValue=confirm('Delete?');")
    >
    > to:
    > If b IsNot Nothing Then b.OnClientClick = "return confirm('Delete?');"
    >
    > Regards,
    > Andy
    >
    > ps. If you are still resistant to this simple solution then you can use
    > javascript to write the value of your ok variable to a hidden field in
    > the page and check this hidden field on the postback.
    >
    > Averell wrote:
    >> Hi, i'm a little confused with all those solutions. Meanwhile i did this
    >> and
    >> i feel i'm close to the solution (??).
    >> The only thing i miss is how to pass the result of the function check()
    >> to
    >> VB.
    >> Thanks
    >>
    >> Dim jv As String
    >> jv = "function check()" _
    >> & "{" _
    >> & " alert('warning');" _
    >> & " var ok=confirm(if you want to delete; click on OK');" _
    >> & " if (!ok)" _
    >> & " {" _
    >> & " window.location.href='mult.aspx';" _
    >> & " return false;" _
    >> & "};" _
    >> & "};" _
    >> & "check();"
    >>
    >> Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "myscript", jv,
    >> True)
    >>
    >> dim x as string
    >> x= result of function check() : HOW TO DO THIS?
    >> if x="False" then e.cancel=True
    >>
    >>
    >> <> wrote in message
    >> news:...
    >> > What Peter Kellner means is that you need to inject some clientside
    >> > javascript when you're creating your delete button and return the
    >> > results of the Confirm.
    >> > In this scenario the RowDeleting serverside event would not even fire
    >> > if the user clicks Cancel because the delete click would be cancelled
    >> > on the clientside.
    >> >
    >> >

    >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/GridViewEx10.asp
    >> > Do a search on the word 'OnClientClick' and you can see some specific
    >> > code on delete confirmation.
    >> >
    >> > Regards,
    >> > Andy
    >> >

    >
     
    Edwin Knoppert, May 31, 2006
    #12
  13. Btw, imo by removing "javascript:" from the line you assume that the browser
    interpret's the code as javascript by default.
    Maybe you better keep "javascript:" in at all times.
    I have not investigated this but i assumed this.



    <> schreef in bericht
    news:...
    >I finally see where the confusion comes from.
    > The return we are talking about is not a return to the serverside code
    > but to the button's click event. So cancel will cancel the click event
    > while a confirm will continue with the click which would then go onto
    > trigger a postback to the server.
    >
    > Take a look at Edwin's code in this thread to see a complete example of
    > this in action.
    > My only suggestion is that the line below can be simplified within
    > Default2.aspx.vb:
    > If b IsNot Nothing Then b.Attributes.Add("onclick",
    > "javascript:window.event.returnValue=confirm('Delete?');")
    >
    > to:
    > If b IsNot Nothing Then b.OnClientClick = "return confirm('Delete?');"
    >
    > Regards,
    > Andy
    >
    > ps. If you are still resistant to this simple solution then you can use
    > javascript to write the value of your ok variable to a hidden field in
    > the page and check this hidden field on the postback.
    >
    > Averell wrote:
    >> Hi, i'm a little confused with all those solutions. Meanwhile i did this
    >> and
    >> i feel i'm close to the solution (??).
    >> The only thing i miss is how to pass the result of the function check()
    >> to
    >> VB.
    >> Thanks
    >>
    >> Dim jv As String
    >> jv = "function check()" _
    >> & "{" _
    >> & " alert('warning');" _
    >> & " var ok=confirm(if you want to delete; click on OK');" _
    >> & " if (!ok)" _
    >> & " {" _
    >> & " window.location.href='mult.aspx';" _
    >> & " return false;" _
    >> & "};" _
    >> & "};" _
    >> & "check();"
    >>
    >> Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "myscript", jv,
    >> True)
    >>
    >> dim x as string
    >> x= result of function check() : HOW TO DO THIS?
    >> if x="False" then e.cancel=True
    >>
    >>
    >> <> wrote in message
    >> news:...
    >> > What Peter Kellner means is that you need to inject some clientside
    >> > javascript when you're creating your delete button and return the
    >> > results of the Confirm.
    >> > In this scenario the RowDeleting serverside event would not even fire
    >> > if the user clicks Cancel because the delete click would be cancelled
    >> > on the clientside.
    >> >
    >> >

    >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/GridViewEx10.asp
    >> > Do a search on the word 'OnClientClick' and you can see some specific
    >> > code on delete confirmation.
    >> >
    >> > Regards,
    >> > Andy
    >> >

    >
     
    Edwin Knoppert, May 31, 2006
    #13
  14. Averell

    Guest

    Fair point about assuming javascript. It is better to be safe so code
    below has be changed.
    If b IsNot Nothing Then b.OnClientClick = "javascript:return
    confirm('Delete?');"

    I don't understand how a postback could have occured after returning
    false to the control's OnClick event.
    The line below should cause the button to never postback to the server
    no matter how many time it is clicked.
    If b IsNot Nothing Then b.OnClientClick = "javascript:return false;"

    Regards,
    Andy

    Edwin Knoppert wrote:
    > Btw, imo by removing "javascript:" from the line you assume that the browser
    > interpret's the code as javascript by default.
    > Maybe you better keep "javascript:" in at all times.
    > I have not investigated this but i assumed this.
    >
    >
    >
    > <> schreef in bericht
    > news:...
    > >I finally see where the confusion comes from.
    > > The return we are talking about is not a return to the serverside code
    > > but to the button's click event. So cancel will cancel the click event
    > > while a confirm will continue with the click which would then go onto
    > > trigger a postback to the server.
    > >
    > > Take a look at Edwin's code in this thread to see a complete example of
    > > this in action.
    > > My only suggestion is that the line below can be simplified within
    > > Default2.aspx.vb:
    > > If b IsNot Nothing Then b.Attributes.Add("onclick",
    > > "javascript:window.event.returnValue=confirm('Delete?');")
    > >
    > > to:
    > > If b IsNot Nothing Then b.OnClientClick = "return confirm('Delete?');"
    > >
    > > Regards,
    > > Andy
    > >
    > > ps. If you are still resistant to this simple solution then you can use
    > > javascript to write the value of your ok variable to a hidden field in
    > > the page and check this hidden field on the postback.
    > >
    > > Averell wrote:
    > >> Hi, i'm a little confused with all those solutions. Meanwhile i did this
    > >> and
    > >> i feel i'm close to the solution (??).
    > >> The only thing i miss is how to pass the result of the function check()
    > >> to
    > >> VB.
    > >> Thanks
    > >>
    > >> Dim jv As String
    > >> jv = "function check()" _
    > >> & "{" _
    > >> & " alert('warning');" _
    > >> & " var ok=confirm(if you want to delete; click on OK');" _
    > >> & " if (!ok)" _
    > >> & " {" _
    > >> & " window.location.href='mult.aspx';" _
    > >> & " return false;" _
    > >> & "};" _
    > >> & "};" _
    > >> & "check();"
    > >>
    > >> Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "myscript", jv,
    > >> True)
    > >>
    > >> dim x as string
    > >> x= result of function check() : HOW TO DO THIS?
    > >> if x="False" then e.cancel=True
    > >>
    > >>
    > >> <> wrote in message
    > >> news:...
    > >> > What Peter Kellner means is that you need to inject some clientside
    > >> > javascript when you're creating your delete button and return the
    > >> > results of the Confirm.
    > >> > In this scenario the RowDeleting serverside event would not even fire
    > >> > if the user clicks Cancel because the delete click would be cancelled
    > >> > on the clientside.
    > >> >
    > >> >
    > >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/GridViewEx10.asp
    > >> > Do a search on the word 'OnClientClick' and you can see some specific
    > >> > code on delete confirmation.
    > >> >
    > >> > Regards,
    > >> > Andy
    > >> >

    > >
     
    , Jun 1, 2006
    #14
  15. It was a long time ago and i had much to learn about js and asp.net.
    I really don't know what happened and at this time i have no time to check
    this out unf..
    I just polled if one had a similar experiance :)

    Thanks,



    <> schreef in bericht
    news:...
    > Fair point about assuming javascript. It is better to be safe so code
    > below has be changed.
    > If b IsNot Nothing Then b.OnClientClick = "javascript:return
    > confirm('Delete?');"
    >
    > I don't understand how a postback could have occured after returning
    > false to the control's OnClick event.
    > The line below should cause the button to never postback to the server
    > no matter how many time it is clicked.
    > If b IsNot Nothing Then b.OnClientClick = "javascript:return false;"
    >
    > Regards,
    > Andy
    >
    > Edwin Knoppert wrote:
    >> Btw, imo by removing "javascript:" from the line you assume that the
    >> browser
    >> interpret's the code as javascript by default.
    >> Maybe you better keep "javascript:" in at all times.
    >> I have not investigated this but i assumed this.
    >>
    >>
    >>
    >> <> schreef in bericht
    >> news:...
    >> >I finally see where the confusion comes from.
    >> > The return we are talking about is not a return to the serverside code
    >> > but to the button's click event. So cancel will cancel the click event
    >> > while a confirm will continue with the click which would then go onto
    >> > trigger a postback to the server.
    >> >
    >> > Take a look at Edwin's code in this thread to see a complete example of
    >> > this in action.
    >> > My only suggestion is that the line below can be simplified within
    >> > Default2.aspx.vb:
    >> > If b IsNot Nothing Then b.Attributes.Add("onclick",
    >> > "javascript:window.event.returnValue=confirm('Delete?');")
    >> >
    >> > to:
    >> > If b IsNot Nothing Then b.OnClientClick = "return confirm('Delete?');"
    >> >
    >> > Regards,
    >> > Andy
    >> >
    >> > ps. If you are still resistant to this simple solution then you can use
    >> > javascript to write the value of your ok variable to a hidden field in
    >> > the page and check this hidden field on the postback.
    >> >
    >> > Averell wrote:
    >> >> Hi, i'm a little confused with all those solutions. Meanwhile i did
    >> >> this
    >> >> and
    >> >> i feel i'm close to the solution (??).
    >> >> The only thing i miss is how to pass the result of the function
    >> >> check()
    >> >> to
    >> >> VB.
    >> >> Thanks
    >> >>
    >> >> Dim jv As String
    >> >> jv = "function check()" _
    >> >> & "{" _
    >> >> & " alert('warning');" _
    >> >> & " var ok=confirm(if you want to delete; click on OK');" _
    >> >> & " if (!ok)" _
    >> >> & " {" _
    >> >> & " window.location.href='mult.aspx';" _
    >> >> & " return false;" _
    >> >> & "};" _
    >> >> & "};" _
    >> >> & "check();"
    >> >>
    >> >> Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "myscript",
    >> >> jv,
    >> >> True)
    >> >>
    >> >> dim x as string
    >> >> x= result of function check() : HOW TO DO THIS?
    >> >> if x="False" then e.cancel=True
    >> >>
    >> >>
    >> >> <> wrote in message
    >> >> news:...
    >> >> > What Peter Kellner means is that you need to inject some clientside
    >> >> > javascript when you're creating your delete button and return the
    >> >> > results of the Confirm.
    >> >> > In this scenario the RowDeleting serverside event would not even
    >> >> > fire
    >> >> > if the user clicks Cancel because the delete click would be
    >> >> > cancelled
    >> >> > on the clientside.
    >> >> >
    >> >> >
    >> >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/GridViewEx10.asp
    >> >> > Do a search on the word 'OnClientClick' and you can see some
    >> >> > specific
    >> >> > code on delete confirmation.
    >> >> >
    >> >> > Regards,
    >> >> > Andy
    >> >> >
    >> >

    >
     
    Edwin Knoppert, Jun 1, 2006
    #15
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Afonin
    Replies:
    2
    Views:
    459
    Peter Afonin
    Nov 19, 2003
  2. XueWu
    Replies:
    0
    Views:
    633
    XueWu
    Jul 12, 2005
  3. Nathan Sokalski
    Replies:
    4
    Views:
    3,533
    Nathan Sokalski
    May 21, 2006
  4. Guest
    Replies:
    0
    Views:
    527
    Guest
    May 24, 2006
  5. Averell
    Replies:
    15
    Views:
    15,644
    Dharmesh Surti
    Aug 23, 2006
Loading...

Share This Page