Postback Problem!!!

Results 1 to 2 of 2

Thread: Postback Problem!!!

  1. #1
    Join Date
    Dec 1969

    Default Postback Problem!!!

    I have a page that uses the microsoft webcontrols. Specifically the tabstrip.<BR>I have a button at the top of my form which saves the values in the tabbed forms to a database. <BR>Unfortunately, every time I click the save button, I get a double posting of the data. After debugging, I found out that the page is always Postback = true.<BR>I did not think this could be the case but if I reopen a page, starting all over again it is always true after clicking the button. It is never false.<BR>For some reason, when I click the save button, it keeps postback to true and does a double posting of data to Sql Server 2000.<BR>I am using the Command object to submit my data , trough a stored procedure, to the database.<BR>CMD.Parameters.Add(@fieldname,SQLDB.V archar, 20);<BR>CMD.ExecuteNonQuery();<BR>Any ideas???????? Puzzling?<BR>

  2. #2

    Default RE: Postback

    I&#039;m not sure the source of the problem, but I&#039;m pretty sure that any time a control with runat="server" causes a return to the server, that request will be a postBack.<BR><BR>In debug, is the code to run your update (CMD.ExecuteNonQuery) called more than once?<BR>You can use F11 to step back out of your update command to see where/why it is called each time.<BR>-A<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts