日期:2014-05-20  浏览次数:20395 次

下面的语句我怎么加上弹出提示框后按确定就继续,按取消就不执行?
Dim   cmd   SqlCommand=   New   SqlCommand( "SP_deletelist ",   cn)
                        cmd.CommandType   =   CommandType.StoredProcedure
                        cmd.Parameters.Add(New   SqlParameter( "@orderno ",   SqlDbType.NVarChar,   20))
                        cmd.Parameters( "@orderno ").Value   =   Gridlist.DataKeys(e.Item.ItemIndex)
                        cmd.Connection.Open()
                        Try
                                cmd.ExecuteNonQuery()
                                lblmsg.Text   =   "删除成功 "
                                lblmsg.Style( "COLOR ")   =   "red "
                        Catch   exp   As   SqlException
                                If   exp.Number   =   2627   Then
                                Else
                                        lblmsg.Text   =   "记录没有被删除,请检查错误! "
                                End   If
                                lblmsg.Style( "Color ")   =   "red "
                                Exit   Sub
                        End   Try
                        cmd.Connection.Close()
                            Gridbind()
                Griddetailbind()
我怎么在cmd.ExecuteNonQuery()执行之前给出提示框,按确定后再执行,按取消就不执行?   求求大家?


------解决方案--------------------
在客户端先询问

------解决方案--------------------
那给大家分了,我一两百分的帖子都没人解决,后面自己解决了,没办法,又不能给自己给分。只能做好人
------解决方案--------------------
那我来抢分