フォームビューで AllowPaging を True にしました。リンク ボタンが表示されていますが、機能していません (実行するには関数が必要であることは明らかです)。Below のような OnPageIndexChangeing イベントがあります。次のページにジャンプして、 pager working.Page_Load イベントで sp を使用して Form ビューをバインドしています。
Aspx コード:
<asp:FormView ID="form_view_with_sp" runat="server" OnModeChanging="mode_changeing" OnPageIndexChanging="page_index_chaging" AllowPaging="true">
page_index_changeing イベント:-
protected void page_index_chaging(object sender, FormViewPageEventArgs e)
{
}
Page_Load:-
SqlConnection con = new SqlConnection(getconnectionstring());
SqlCommand cmd = new SqlCommand();
//cmd.CommandText = "selectprocedure";
DataTable dt = new DataTable();
cmd.Connection = con;
con.Open();
SqlDataAdapter adb = new SqlDataAdapter("selectprocedure", con);
form_view_with_sp.DataSource = dt;
form_view_with_sp.DataBind();
前もって感謝します。