Automatically open a new window

2 posts, 1 answers
  1. Aneesh
    Aneesh avatar
    9 posts
    Member since:
    May 2012

    Posted 22 Jun 2012 Link to this post

    Hi,

    I have a radtextbox. If some text is entered into it, it should open a new window with a textbox which contains the same text in the parent.

    Thanks,

    Aneesh Daniel
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 22 Jun 2012 Link to this post

    Hello Aneesh,

    Try the following code to achieve your scenario.
    aspx:
    <telerik:RadTextBox ID="RadTextBox1" runat="server" AutoPostBack="true" ontextchanged="RadTextBox1_TextChanged" ></telerik:RadTextBox>
     <telerik:RadWindowManager ID="RadWindowManager2" runat="server">
     <Windows>
       <telerik:RadWindow ID="RadWindow1" runat="server">
        <ContentTemplate>
          <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        </ContentTemplate>
       </telerik:RadWindow>
     </Windows>
    </telerik:RadWindowManager>
    C#:
    protected void RadTextBox1_TextChanged(object sender, EventArgs e)
    {
      RadTextBox rtxt = (RadTextBox)sender;
      RadWindow1.VisibleOnPageLoad = true;
      TextBox txt = (TextBox)RadWindow1.ContentContainer.FindControl("TextBox1");
      txt.Text = rtxt.Text;
    }

    Thanks,
    Shinu.
Back to Top