0

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.

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.ArgumentException: 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 error something like this.I searched for solution i got somany solution;tried but having same problem 1.Added all item inside update panel 2.Added EnableEventValidation="true" 3.Used

(!IsPostBack)
            {
}

everywhere still having same problem can anyone help me to resolve.

 <table>
                                                <tr>
                                                    <td>
                                                         <asp:UpdatePanel ID="updGrid" runat="server" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <div style="background-color: #F1F1F1; border: solid 1px #CDCDCD; padding-left: 0px;
                                        padding-top: 5px; width: 913px;">
                                        <div style="overflow-x: hidden; overflow-y: auto; height: 95px; width: 907px;">
                                            <asp:GridView ID="dgvRpt" runat="server" Width="912px" CssClass="Grid"  AutoGenerateColumns="false"
                                             OnRowDataBound="dgvRptOnRowDataBound" OnRowCommand="OnRowCommandClick"   RowStyle-Font-Names="Arial"  
                                             EmptyDataText="No record found" EmptyDataRowStyle-Height="90px" EmptyDataRowStyle-Font-Bold="true"
                                             EmptyDataRowStyle-Font-Names="Arial" 
                                                EmptyDataRowStyle-HorizontalAlign="Center" 
                                                onselectedindexchanged="dgvRpt_SelectedIndexChanged"  >
                                                <RowStyle HorizontalAlign="Left" />
                                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="black" Font-Names="Arial" />
                                                <PagerStyle BackColor="#CDCDCD" ForeColor="White" HorizontalAlign="Center" Font-Names="Arial" />
                                                <HeaderStyle BackColor="#CDCDCD" Font-Bold="True" ForeColor="black" Font-Names="Arial" />
                                                <HeaderStyle CssClass="GridHeader" Font-Names="Arial"></HeaderStyle>
                                                <AlternatingRowStyle CssClass="GridAtlItem" />
                                                <Columns>
                                                    <asp:BoundField  HeaderText="Sl.no" DataField="Sl.No" />
                                                     <asp:BoundField  HeaderText="AssignmentID" DataField="AssignmentID"  Visible="false"/>
                                                     <asp:BoundField  HeaderText="QstnMasterID" DataField="QstnMasterID"  Visible="false"/>
                                                     <asp:BoundField  HeaderText="UserID" DataField="UserID"  Visible="false"/>

                                                    <asp:BoundField  HeaderText="Kid Name" DataField="Kid Name" />
                                                    <asp:BoundField  HeaderText="Assignment" DataField="Assignment" />
                                                    <asp:BoundField  HeaderText="Mark" DataField="Mark" />
                                                    <asp:BoundField  HeaderText="Max. Mark" DataField="Max. Mark" /> 
                                                    <asp:BoundField  HeaderText="Percentage" DataField="Percentage" />
                                                     <asp:BoundField  HeaderText="Submitted On" DataField="Submitted On" /> 
                                                    <asp:TemplateField  HeaderText="Go To Ans">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="lnkview" runat="server" Text="View Ans"  CommandName="linkClick"></asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                            </asp:GridView>
                                        </div>

                                    </div>
                                </ContentTemplate>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="ImgbtnReport" EventName="Click" />
                                </Triggers>
                            </asp:UpdatePanel>
                                                    </td>
                                                </tr>
                                            </table>

I felt may be this code i am getting error.

Zadalaxmi
  • 421
  • 9
  • 27

0 Answers0