<asp:Button ID="Button2" runat="server" BorderWidth="1px" CssClass="btn" OnClick="test"
Style="display: none" />
<script language="javascript" type="text/javascript">
function CallClick() {
document.getElementById('Button2').click();
}
</script>
protected void test(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand("Test");
cmd.Connection = con;
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
Ref: (other way)
http://www.aspsnippets.com/Articles/Populate-ASPNet-GridView-by-binding-DataSet-Client-Side-using-jQuery-AJAX.aspx
http://stackoverflow.com/questions/20465104/populating-gridview-using-ajax
Style="display: none" />
<script language="javascript" type="text/javascript">
function CallClick() {
document.getElementById('Button2').click();
}
</script>
protected void test(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand("Test");
cmd.Connection = con;
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
Ref: (other way)
http://www.aspsnippets.com/Articles/Populate-ASPNet-GridView-by-binding-DataSet-Client-Side-using-jQuery-AJAX.aspx
http://stackoverflow.com/questions/20465104/populating-gridview-using-ajax
No comments:
Post a Comment