views:

664

answers:

1

iam retrieving download urls from database on button2 but when i put my gridview inside updatepanel..it gives me following error

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>


<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
ShowHeaderWhenEmpty="True" EmptyDataText="No Uploads are found" ShowEmptyTable="True"
ShowFooterWhenEmpty="False" Style="margin-top: 20px" OnSelectedIndexChanged="GridView2_SelectedIndexChanged"
  OnRowDataBound="GridView2_RowDataBound" 

 :

:

:

:


<asp:TemplateField ShowHeader="False" HeaderText="Receive">
<ItemTemplate> 
<asp:Button ID="Button2" runat="server" CausesValidation="false" CommandName="select"
Text="Receive" /> 
</ItemTemplate>
</asp:TemplateField>
A: 

Try adding a trigger within your UpdatePanel:

</ContentTemplate> 
<Triggers>
    <asp:AsyncPostBackTrigger ControlID="Button2" EventName="Click" />        
</Triggers>
KMoraz
Well, presumably the UpdatePanel end tag is after the end of the GridView, so the GridView should treat all children controls as triggers, so I doubt if that would be necessary.
Rafe Lavelle
Well! yeah it works...ijust used nested updatepanel for button and trigger it inside it..it wrks...whats with this child as trigger thing..it doesnt seem to apply much what it says!!!
ravi
may be these table controls are not so compatible with updapanels even when converted to templates!!
ravi
If it works please mark as accepted answer.
KMoraz