Wrox Programmer Forums
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 20th, 2006, 06:59 AM
Authorized User
Join Date: Jun 2006
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default GrdView Postback twice

    I am using the GridView with SQLDataSource.
   WhenEver i click on grid Delete Command it executes the SP twice.
here is the Delete
parameters and Stored Procedure. If any one having the solution then plz give me chance of thanks.

************************************************** **********
    <asp:Parameter Name="Complaint#" Type="Int32" />
    <asp:Parameter name="IsResolved" Type="string" Direction="Output"/>

************************************************** **********

ALTER Procedure Complaint_Resolved
    @Complaint# int,
    @IsResolved varchar(400) OUT

     Declare @Complainer_Satisfied int

        @Complainer_Satisfied = Count(*)

     From dbo.Complaint

         Complaint_id = @Complaint# And
        Complainer_Satisfied = 1

     IF @Complainer_Satisfied = 0
        SET @IsResolved = 'WithOut Complainer' + Char(39) + 's Satisfaction ,You Can' + Char(39) + 't End the Complaint.'
        Update Complaint
        Set Date_Resolved = getdate()
        Where Complaint_id = @Complaint#
        SET @IsResolved = Null

   SELECT @IsResolved


Old June 20th, 2006, 12:00 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts


The stored procedure is an update; is this the right proc? ALso, how is the delete called?

Old June 21st, 2006, 09:20 AM
Authorized User
Join Date: Jun 2005
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to aldwinenriquez

could you show me the html in the aspx page and the code behind for the delete command?

"Dont you ever give up!"

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postback grstad ASP.NET 2.0 Basics 3 June 13th, 2008 07:56 AM
Postback other page Snuffles ASP.NET 2.0 Basics 1 July 7th, 2007 12:46 AM
postback sameer_1981 ASP.NET 1.0 and 1.1 Basics 1 February 23rd, 2007 09:36 AM
Postback raulsormus Classic ASP Basics 0 February 22nd, 2005 09:36 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.