473,563 Members | 2,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

BUG: Asp.Net2 EventValidation + DataGrid + PushButton Error .

Hello ASP.NET team :

I have a user control that be added into page at runtime , in a postback
event handler .

I save the information to view state , and load the user control again in
CreateChildCont rols again .

There's a datagrid in the user control .
The datagrid bind the data when the user control be loaded at the first
time.

When I use 'LinkButton' for the delete button , it work well .

When I change to 'PushButton' , an error be thrown .

I think my program have no problem . Please check why 'PushButton' has such
exception ?

----------------------------------------------------------------------------
System.Web.Http UnhandledExcept ion: Exception of type
'System.Web.Htt pUnhandledExcep tion' was thrown. --->
System.Argument Exception: Invalid postback or callback argument. Event
validation is enabled using in configuration or 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.
at System.Web.UI.C lientScriptMana ger.ValidateEve nt(String uniqueId, String
argument)
at System.Web.UI.C ontrol.Validate Event(String uniqueID, String
eventArgument)
at System.Web.UI.W ebControls.Butt on.RaisePostBac kEvent(String eventArgument)
at
System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
eventArgument)
at System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument)
at System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
at System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint)
--- End of inner exception stack trace ---
at System.Web.UI.P age.HandleError (Exception e)
at System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint)
at System.Web.UI.P age.ProcessRequ est(Boolean includeStagesBe foreAsyncPoint,
Boolean includeStagesAf terAsyncPoint)
at System.Web.UI.P age.ProcessRequ est()
at System.Web.UI.P age.ProcessRequ estWithNoAssert (HttpContext context)
at System.Web.UI.P age.ProcessRequ est(HttpContext context)
at ASP.page_aspx.P rocessRequest(H ttpContext context) in
c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET
Files\website\9 9b74d5c\80b811c 2\App_Web_2xqcs b4i.2.cs:line 0
at
System.Web.Http Application.Cal lHandlerExecuti onStep.System.W eb.HttpApplicat ion.IExecutionS tep.Execute()
at System.Web.Http Application.Exe cuteStep(IExecu tionStep step, Boolean&
completedSynchr onously)
May 24 '06 #1
0 1188

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2019
by: Nick Gilbert | last post by:
We have a Datagrid which contains a template column with a button in it, as well as an actual button column. If either of the buttons are clicked, the ItemCommand event does not fire. If however, the ButtonType of the ButtonColumn is changed to "LinkButton" instead of "PushButton", the event fires normally! Why on earth is this...
1
1705
by: m3ckon | last post by:
Hi there, please help if you can, I'm having an issue with droponnlists in a datagrid I have a datagrid which is populated from a query .. all works fine I've added two extra columns, one is a dropdownlist and the other is a button which runs the command selectcode for this:
9
4594
by: tshad | last post by:
Is there a way to use your own image in place of the automatic one that ASP uses when doing editing in your DataGrid pages? We already have a style of button we are using and would like to be consistant. Thanks, Tom.
1
1317
by: Joe | last post by:
Hi, I have form with datagrid. This is what my form tag looks like, <form runat="server"> <asp:label runat="server" id="lblMessage" /> <asp:DataGrid runat="server" id="articleList" DataKeyField="FullName" OnItemDataBound="articleList_ItemDataBound" OnEditCommand = "articleList_Edit"
4
1160
by: Nicky | last post by:
hi, all I just got a question here when I am using the datagrid, my code like this: <asp:DataGrid id="DataGridBanner" runat="server" style=....> ..... <Columns> <% if(m_adUser.IsWebMaster()) { %> <asp:EditCommandColumn Visible='<%# m_adUser.IsWebMaster()%>' ButtonType="PushButton" UpdateText="Update" CancelText="Cancel"...
0
1401
by: PL | last post by:
It seems there is a bug or at least an annoynance with the new eventvalidation. I can't really tell you a certain way to reproduce this but I have a large datagrid that uses custom paging, I have navigation controls both at the top and the bottom. Everything works fine if you click the navigation links and allow the page to fully load...
5
6544
by: Vik | last post by:
If there are a few Select buttons in a datagrid, is there a way to distinguish in code which button was clicked? Thanks.
2
3241
by: Rajani | last post by:
Hello, <asp:DataGrid ID="dg1" AllowPaging="True" AllowSorting="True" AlternatingItemStyle-BackColor="#ccccff" AlternatingItemStyle-Font-Name="arial" AlternatingItemStyle-ForeColor="#333366" CellPadding="3" DataKeyField="empid" OnPageIndexChanged="chgpage" OnSortCommand="sortdg" PageSize="10" PagerStyle-Mode="NumericPages" Runat="server"...
3
1570
by: tjonsek | last post by:
am working on code that will allow users to update data within the datagrid. I have come across a few problems, some of them I have been able to work out, but this last one is giving me trouble. When a user clicks the edit button, I get an error 'Specified Cast Not Valid'. The code that generates the error is: Dim strCompleted As String =...
0
7664
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.