一个textbox加一个搜索按钮,点按钮出来一个窗口,窗口是以树形结构显示的,点击树形结构上的某个值,这个值返回到textbox,这样的功能得怎么实现

解决方案 »

  1.   

    1.设置Form1的TextBox访问性为public
    2.
    TreeView的AfterSelect里写:
    Form1 frm =new Form1();
    frm.TextBox1.Text = TreeView.SelectedNode.Text;
    this.Close()
      

  2.   


    楼上的,你不回答也不要瞎顶可好。难道你不是一步一步过来的?你生来就会?<html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>无标题页</title>
        <script type="text/javascript">
        
    function Button1_onclick()
    {
        var k=showModalDialog("b.aspx",self);//打开b窗口
    }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <input id="Button1" type="button" value="button" onclick="return Button1_onclick()" />
            <input id="Text1" type="text" /></div>
        </form>
    </body>
    </html>
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>无标题页</title>
    <script language="javascript" type="text/javascript">function Button1_onclick() {
    window.dialogArguments.document.getElementById("Text1").value="aaa";//给a窗口的文本框添加值
    }</script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <input id="Button1" type="button" value="button" onclick="return Button1_onclick()" />
        </div>
        </form>
    </body>
    </html>
      

  3.   


    严重B4用cs的东西来回答bs的问题严重B4