The function gets Fired Twice why ?
-
Good Day All i have a function that is getting called with Pagemethods like this
protected void Bind\_SearchBox(object sender, EventArgs e) { RadToolBarItem textItem = RadToolBar1.FindItemByText("Button1"); TextBox txtseach = (TextBox)textItem.FindControl("txtsearch"); try { if (sender.Equals(txtseach)) { Bind\_SearchBox(txtseach.Text); } } catch (SqlException ex) { lblMessage.Text = ex.Message; Response.Redirect("View.aspx", false); } }
and this method will call this
/// <summary>
/// This Function will bind the ListBoxes on the Lefthand side of the Viewer
/// It accept a search String
/// </summary>
public void Bind_SearchBox(String Search)
{
Session["Search"] = Search;RadPanelBar1.Items.Clear(); RadScheduler1.Appointments.Clear(); //get the Menu inside the toolbar RadToolBarItem textItem = RadToolBar1.FindItemByText("Button1"); RadMenu RadMenu1 = (RadMenu)textItem.FindControl("RadMenu1"); ViewerService.ViewerService obj = new ViewerService.ViewerService(); String SessionKey = obj.newSession(); DateTime Date1 = Convert.ToDateTime("1980-01-01"); DateTime Date2 = Convert.ToDateTime("2012-12-31"); List<string> ParentRecordsRow = new List<string>(); List<string> ChildRecordsField = new List<string>(); ViewerService.extract extract = obj.getObjects(SessionKey, Search, Date1, false, Date2, false, "", ""); try { int Len = extract.set.Length; for (int i = 0; i < Len; i++) { ViewerService.vertex value = extract.set\[i\];//Row String PanelClass = value.meta; PanelClass = PanelClass.Replace(Remstr, ""); PanelClass = PanelClass.Replace(Remstr2, ""); Appointment app = null; if (value.atom != null) { RadPanelItem pane = RadPanelBar1.Items.FindItemByText(PanelClass); if (pane == null) { RadPanelItem nwpane = new Telerik.Web.UI.RadPanelItem(PanelClass); R
-
Good Day All i have a function that is getting called with Pagemethods like this
protected void Bind\_SearchBox(object sender, EventArgs e) { RadToolBarItem textItem = RadToolBar1.FindItemByText("Button1"); TextBox txtseach = (TextBox)textItem.FindControl("txtsearch"); try { if (sender.Equals(txtseach)) { Bind\_SearchBox(txtseach.Text); } } catch (SqlException ex) { lblMessage.Text = ex.Message; Response.Redirect("View.aspx", false); } }
and this method will call this
/// <summary>
/// This Function will bind the ListBoxes on the Lefthand side of the Viewer
/// It accept a search String
/// </summary>
public void Bind_SearchBox(String Search)
{
Session["Search"] = Search;RadPanelBar1.Items.Clear(); RadScheduler1.Appointments.Clear(); //get the Menu inside the toolbar RadToolBarItem textItem = RadToolBar1.FindItemByText("Button1"); RadMenu RadMenu1 = (RadMenu)textItem.FindControl("RadMenu1"); ViewerService.ViewerService obj = new ViewerService.ViewerService(); String SessionKey = obj.newSession(); DateTime Date1 = Convert.ToDateTime("1980-01-01"); DateTime Date2 = Convert.ToDateTime("2012-12-31"); List<string> ParentRecordsRow = new List<string>(); List<string> ChildRecordsField = new List<string>(); ViewerService.extract extract = obj.getObjects(SessionKey, Search, Date1, false, Date2, false, "", ""); try { int Len = extract.set.Length; for (int i = 0; i < Len; i++) { ViewerService.vertex value = extract.set\[i\];//Row String PanelClass = value.meta; PanelClass = PanelClass.Replace(Remstr, ""); PanelClass = PanelClass.Replace(Remstr2, ""); Appointment app = null; if (value.atom != null) { RadPanelItem pane = RadPanelBar1.Items.FindItemByText(PanelClass); if (pane == null) { RadPanelItem nwpane = new Telerik.Web.UI.RadPanelItem(PanelClass); R
-
i am Calling the Function when the user presses enter , here is the markup
Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/
-
i am Calling the Function when the user presses enter , here is the markup
Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/