ASP FormView

2 posts, 0 answers
  1. Kyle
    Kyle avatar
    2 posts
    Member since:
    Nov 2015

    Posted 03 Dec 2015 Link to this post

    I have found very little information on rebinding data in an ASP.NET FormView control without doing a PostBack.

    My Scenario is a button on a page with bound FormView data opens a RadWindow and a database edit is done.  Optimally I'd like to have the underlying parent page rebind as soon as the RadWindow database update occurs.

    However just to get going I am using RadWindow's OnClientClose to rebind the FormView:

    <asp:formview id="FormView1" runat="server" enableviewstate="false">
                    <%# Eval("StreetAddress") %>
             function clientClose() {
                    var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
                  ID="RadAjaxManager1" runat="server"       

    All the above .aspx code works but where I am confused is the code behind.  Below is my guess on what the code behind would be:

            protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)

  2. Kyle
    Kyle avatar
    2 posts
    Member since:
    Nov 2015

    Posted 03 Dec 2015 in reply to Kyle Link to this post

    Here is where I bind the FormView initially:


    protected void Page_Load(object sender, EventArgs e)
            if ((Session["AccessLevel"].ToString() == "admin") || (Session["AccessLevel"].ToString() == "worker"))
                if (Request.QueryString["status"] == "Yellow")
                    SqlConnection con = new SqlConnection(connectionString);
                    string qry = "SELECT StreetAddress FROM [User]";
                    SqlCommand cmd = new SqlCommand(qry, con);
                    SqlDataAdapter da = new SqlDataAdapter(cmd);
                    DataTable dt = new DataTable();
                    FormView1.DataSource = dt;

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top