Button Inside Header template of Gridview--gives error on click

D

divya

I have used a button in the header of a gridview which has submit
behaviour true .

<asp:TemplateField HeaderText="Notify By Mail">
<ItemTemplate>
<asp:CheckBox ID="chkNotify" runat="server" />&nbsp;
</ItemTemplate>
<HeaderTemplate>
<asp:Button ID="btnnotify" runat="server"
CausesValidation="False" CssClass="button"
Font-Bold="True" Text="Notify by Email"
CommandName="notify" />&nbsp;
</HeaderTemplate>
</asp:TemplateField>

When I click on this button I recieve the error :-

"Invalid postback or callback argument. Event validation is
enabled using <pages enableEventValidation="true"/> 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 recieve this error only if "submit behaviour is true" .

How do I make this button persent in the header of the gridview work
as a Submit button. I only need the values of the gridview which holds
this button.

Regards,
Divya
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top