Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Invalid postback or callback argument

Invalid postback or callback argument

Scheduled Pinned Locked Moved ASP.NET
helpcsssysadminsecurityannouncement
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Amit Spadez
    wrote on last edited by
    #1

    I have a web page in which there is GridView binded with some records. There are two buttons i.e. delete button and update button in the grid. Now When i click delete button, then the RowCommand event fires and it works perfectly. But when I click on update button to update the current row and then clicks on delete button to delete any row, then the following error occurs : Invalid postback or callback argument. Event validation is enabled using 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 I have also used "EnableEventValidation='False'" in the page.aspx but still getting same error .. Kindly help ASAP

    J 1 Reply Last reply
    0
    • A Amit Spadez

      I have a web page in which there is GridView binded with some records. There are two buttons i.e. delete button and update button in the grid. Now When i click delete button, then the RowCommand event fires and it works perfectly. But when I click on update button to update the current row and then clicks on delete button to delete any row, then the following error occurs : Invalid postback or callback argument. Event validation is enabled using 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 I have also used "EnableEventValidation='False'" in the page.aspx but still getting same error .. Kindly help ASAP

      J Offline
      J Offline
      jkirkerx
      wrote on last edited by
      #2

      Since the sever generated the object, it expects to have full control over it. So the delete has to delete in the server side post back, and then rendered again on page load. It's a security issue in asp.net. You can wrap the object in an update panel, and so a small ajax trip to the server and back, while maintaining server side control.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups