Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

LinkButton in GridView with Update Panel Not working

$
0
0


I am binding the Data to the GridView Control and When i click the Linkbutton in the GridView Control i am getting Exception:

Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:GridView Id="gvDetails" runat="server">
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CommandArgument='<%# Convert.ToString(DataBinder.Eval(Container.DataItem, "up_user")) %>'
OnCommand="LinkButton1_Click" Text='<%# Convert.ToString(DataBinder.Eval(Container.DataItem, "name")) %>'> </asp:LinkButton>
</ItemTemplate>
</asp:GridView>

</ContentTemplate>

</asp:UpdatePanel>


protected void LinkButton1_Click(Object sender, CommandEventArgs e)
{

if (e.CommandArgument != null)
{

Response.Redirect("http://google.com");

}

}

Please Help Me.

Thanks,


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>