Repeater Control Header Template Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Simit Kulkarni
    New Member
    • May 2007
    • 5

    Repeater Control Header Template Problem

    Hi All,

    I am stucked with a problem , regarding Repeater Controls Header Template.
    I want to show a Image Button in the Header Template of a Repeater Control and on the Click of that button, I would like to show one small Pop-up window.
    Now , problem here is that , How to catch the event generated by the Image Button?

    The Header Template looks like ....
    <HeaderTemplate >
    <table border = 0>
    <tr>
    <th> Name </th>
    <th> ID </th>
    <th> Dept</th>
    <th>
    <asp:ImageButto n ID="ImageButton 1" CommandName="up date" runat="server" />
    </th>
    </tr>
    </HeaderTemplate>
    Now , whenever I click on Image Button , some Server Error is shown,

    Error is like,

    Server Error in '/RepeaterCtrl' Application.
    --------------------------------------------------------------------------------

    Invalid postback or callback argument. Event validation is enabled using <pages enableEventVali dation="true"/> in configuration or <%@ Page EnableEventVali dation="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 ClientScriptMan ager.RegisterFo rEventValidatio n method in order to register the postback or callback data for validation.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Argument Exception: Invalid postback or callback argument. Event validation is enabled using <pages enableEventVali dation="true"/> in configuration or <%@ Page EnableEventVali dation="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 ClientScriptMan ager.RegisterFo rEventValidatio n method in order to register the postback or callback data for validation.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Please, Can anybody Help me? Does anybody knows anything about this?
  • nateraaaa
    Recognized Expert Contributor
    • May 2007
    • 664

    #2
    Originally posted by Simit Kulkarni
    Hi All,

    I am stucked with a problem , regarding Repeater Controls Header Template.
    I want to show a Image Button in the Header Template of a Repeater Control and on the Click of that button, I would like to show one small Pop-up window.
    Now , problem here is that , How to catch the event generated by the Image Button?



    Now , whenever I click on Image Button , some Server Error is shown,

    Error is like,



    Please, Can anybody Help me? Does anybody knows anything about this?
    I did several searches on this topic and it seemed that this is a common problem for many 2.0 users. The quick fix is to set EnableEventVali dation="false" at the page level or <pages enableEventVali dation="false"/> in the web.config. There was also another idea that involved databinding the grid in the !IsPostBack of the PageLoad event. For more information on this please see this site .

    I hope this helps solve your problem

    Nathan

    Comment

    • Simit Kulkarni
      New Member
      • May 2007
      • 5

      #3
      Originally posted by nateraaaa
      I did several searches on this topic and it seemed that this is a common problem for many 2.0 users. The quick fix is to set EnableEventVali dation="false" at the page level or <pages enableEventVali dation="false"/> in the web.config. There was also another idea that involved databinding the grid in the !IsPostBack of the PageLoad event. For more information on this please see this site .

      I hope this helps solve your problem

      Nathan

      Thanks Nathan for ur Reply.

      I already did EnableEventVali dation="false".
      What I want to know was , is there any other way?
      Becuase , Turning off EnableEventVali dation for whole page is not a good Idea.

      But, I must admit, that the link given by u , helped me alot to understand this problem much better.

      Thanks Again.

      Comment

      Working...