Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Button Inside Header template of Gridview--gives error on click

Reply
Thread Tools

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

 
 
divya
Guest
Posts: n/a
 
      08-09-2007
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Binding data to datagrid header template on button click Santosh ASP .Net 0 08-04-2006 04:57 AM
how to bind data to datagrid header template on button click event Santosh ASP .Net 0 08-02-2006 05:21 AM
How to fire both event button click and textchanged when button is click and text is changed Amy ASP .Net 0 06-01-2006 02:33 PM
image button click event fires before click event of button Purvi T ASP .Net 0 10-19-2004 06:19 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net 2 05-25-2004 11:45 PM



Advertisments