Last post Feb 08, 2012 08:17 PM by Decker Dong - MSFT
Feb 07, 2012 06:16 AM|simcoles1|LINK
I have developed a Server Control that inherits off GridView. it has an export to excel facility, which is handled when the user clicks an ImageButton, which is contained within the BottomPager Row of the Grid. This all works fine until I put it in an
Update Panel where I get a
Uncaught Sys.WebForms.PageRequestManagerParserErrorException error.
I have read a number of posts none of which have solved my problem including.
Getting a reference to the ImageButton Control,
Protected Overrides Sub OnPreRenderComplete(e As System.EventArgs)
Dim table As Control = FGV1.Controls(0)
Dim pagerControlAt As Integer = table.Controls.Count - 1
Dim pagerCell As Control = table.Controls(pagerControlAt)
Dim excelImageBtn As ImageButton = CType(pagerCell.FindControl("excelImage"), ImageButton)
Dim excelImageId As String = excelImageBtn.ClientID
Dim trigger As PostBackTrigger = New PostBackTrigger()
trigger.ControlID = excelImageBtn.ClientID
'excelImageBtn.Visible = False
errorLabel.Text = excelImageId
I have tried with ID and ClientID no difference. I have Overriden VerifyRenderingInServerForm and set EnableEventValidation="false" Any help would be much appreciated.
Feb 07, 2012 06:28 AM|sudeep_13|LINK
Pls use the ImageButton with ScriptManager.RegisterAsyncPostbackcontrol method. See link below for sample
Feb 07, 2012 06:39 AM|kirupa.v|LINK
Feb 08, 2012 08:17 PM|Decker Dong - MSFT|LINK
If you are sure that your proj can properly work without an UpdatePanel，please put both imagebutton as well as the other controls into the UpdatePanel and have a try。