Bind DataGrid using ajax
Is it possible to set the datasource of a datagrid view using ajax? My objective is to bind a开发者_Go百科 datagrid on clicking a hyperlink(in the same page). Please help.
You should use LinkButton
Instead
protected void LinkButton1_Click(object sender, EventArgs e)
{
// set DataSource here .....
}
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<%-- GridView--%>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="LinkButton1" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
精彩评论