protected void btnload_Click(object sender, EventArgs e)
        {
            int a = _userID;
            int d = 0;
            int f = 0;

            string b = txtfrom.Text.Trim().ToString();
            string c = txtTo.Text.Trim().ToString();
            if (ddlfilter.SelectedValue.ToString() == "-Select Filter-")
                d = 0;
            else
                d = int.Parse(ddlfilter.SelectedValue.ToString());
            if (ddlEmployee.SelectedValue.ToString() == "-Select Employee-")
                f = 0;
            else
                f = int.Parse(ddlEmployee.SelectedValue.ToString());

            objdeshboardentity.insertdatefilterdata(a, b, c, d, f);
            // gadget adding and removing method
            ArrayList ary = (ArrayList)ViewState["registredlist"];
            for (int i = 0; i < dtlsgadget.Items.Count; i++)
            {
                Label controlname = (Label)dtlsgadget.Items[i].FindControl("lblgadgetname");
                Label controlurl = (Label)dtlsgadget.Items[i].FindControl("lblGadgeturl");
                if (((CheckBox)dtlsgadget.Items[i].FindControl("chk1")).Checked == true && (!ary.Contains(controlurl.Text)))
                {

                    RadDock dock = CreateRadDock();
                    //find the target zone and add the new dock there                    
                    //RadDockZone dz = (RadDockZone)RadDockLayout1.FindControl("RadDockZone1");                    
                    RadDockZone3.Controls.Add(dock);
                    CreateSaveStateTrigger(dock);

                    //Load the selected widget in the RadDock control   
                    dock.Tag = controlurl.Text.Trim().ToString();
                    dock.Title = controlname.Text.Trim().ToString();
                    LoadWidget(dock);
                    List<DockState> stateList = RadDockLayout1.GetRegisteredDocksState();
                    StringBuilder serializedList = new StringBuilder();
                    int j = 0;

                    // 
                    ArrayList arrCurrentDockTags = new ArrayList();
                    ArrayList arrClosedDockTags = new ArrayList();
                    //

                    while (j < stateList.Count)
                    {
                        serializedList.Append(stateList[j].ToString());
                        serializedList.Append("|");

                        //add tag (Custom Gadget's Path) to array which are not closed.
                        if (!stateList[j].Closed)
                        {
                            arrCurrentDockTags.Add(stateList[j].Tag);
                        }
                        else
                        {
                            arrClosedDockTags.Add(stateList[j].Tag);
                        }

                        j++;
                    }

                    //code to hide check box and show label 'Added' in Gadget Box

                    string dockState = serializedList.ToString();
                    int Result;
                    if (dockState.Trim() != String.Empty)
                    {
                        objDefaultGadgetsDAL = new DefaultGadgetsDAL();
                        Result = objDefaultGadgetsDAL.SaveDashBoardPersonalization(_userID, dockState);
                    }
                }

            }
            //end gadget add and remove method
            Response.Redirect("~/Views/Workplace/AccountDashBoard.aspx");
        }
        protected void RadDockLayout1_SaveDockLayout(object sender, DockLayoutEventArgs e)
        {
            List<DockState> stateList = RadDockLayout1.GetRegisteredDocksState();
            StringBuilder serializedList = new StringBuilder();
            int i = 0;

            // 
            ArrayList arrCurrentDockTags = new ArrayList();
            ArrayList arrClosedDockTags = new ArrayList();
            //

            while (i < stateList.Count)
            {
                serializedList.Append(stateList[i].ToString());
                serializedList.Append("|");

                //add tag (Custom Gadget's Path) to array which are not closed.
                if (!stateList[i].Closed)
                {
                    arrCurrentDockTags.Add(stateList[i].Tag);
                }
                else
                {
                    arrClosedDockTags.Add(stateList[i].Tag);
                }
                i++;
            }

            //code to hide check box and show label 'Added' in Gadget Box

            string dockState = serializedList.ToString();
            int Result;
            if (dockState.Trim() != String.Empty)
            {
                objDefaultGadgetsDAL = new DefaultGadgetsDAL();
                Result = objDefaultGadgetsDAL.SaveDashBoardPersonalization(_userID, dockState);
            }
            loadalldashboard();
        }