473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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:ImageButton ID="ImageButton1" CommandName="update" 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 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.
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 <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.

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?
Jul 13 '07 #1
2 4827
nateraaaa
663 Expert 512MB
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 EnableEventValidation="false" at the page level or <pages enableEventValidation="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
Jul 13 '07 #2
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 EnableEventValidation="false" at the page level or <pages enableEventValidation="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 EnableEventValidation="false".
What I want to know was , is there any other way?
Becuase , Turning off EnableEventValidation 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.
Jul 17 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Robert Walter | last post by:
I was looking for a method to repeat the headers on an ASP.NET Repeater control. I couldn't find quite what I wanted on the web so I implemented it myself. I thought it maybe useful for some of you...
4
by: Alan Silver | last post by:
Hello, If I have a control in the header template of a repeater, how do I get at this in code? I know how to do this for an ItemTemplate, you just do... txtFred =...
3
by: Shimon Sim | last post by:
I put linkbutton in a repeater header. I attached event handler in makeup as onclick="btnSort_Click". Made btnSort_Click method public. It doesn't fire if I click on it. I tried to attach it in...
1
by: Steve Franks | last post by:
OK this is driving me nuts - hope someone can help. I am searching for a way to dynamically output a value within the HeaderTemplate section of a Repeater control. Is this possible? It is...
4
by: sck10 | last post by:
Hello, I have a repeater that is bound to a SQL Server table. I would like to place a summary in the footer for the item count and product cost. I have two fields. One for the product name...
8
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the...
2
by: AC [MVP MOSS] | last post by:
I have a repeater with a header, footer, and item template. The item template is the only one with server controls (hyperlinks, labels, and a nested repeater). Within the top repeater, I'm handling...
3
by: shapper | last post by:
Hello, I am created an Asp.Net 2.0 repeater implementing the ITemplate class. I know my datasource, a datatable has 6 rows, but the repeater only displays the last one. If I add more rows...
3
by: Emma Middlebrook | last post by:
Hi there, I've been trying to implement a repeater control in an ASP.NET 2 page but I can't seem to get the layout exactly how I want and I'm not sure if it's something that I am doing wrong or...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.