目前在对一个报价平台进行改版,将ASP改为.Net。这里有一个多条添加的功能(地址:http://www.yuanlin.com/shangmao/mmbj_Add.asp?class1id=1&Class2id=6)全完由JS控制,动态添加表格和表单元素。现改为.Net将涉及到一些下拉菜单数据绑定之类的问题,请问该如何处理?最好能提供例子参考,谢谢各位大虾!

解决方案 »

  1.   

    一次提交一条,或者在客户端把多条数据组织成XML格式提交
      

  2.   

    .net和js融合的很好呀?你也可以在后台调用js函数
      

  3.   

    oldmoon(浪者) 
    你可能没看我上面发的那个网址,看了应该就会明白
      

  4.   

    TO:iuhxq(小灰) 
    我现在不是数据提交的问题,而是动态添加表格/表单的问题,然后下拉菜单的数据绑定
      

  5.   

    完全可以不用js啊,用<asp:Table对象动态增加行/列/控件就可以了.
      

  6.   

    to:wangkun9999()
    里面的元素呢?还有控件~都可以动态写么?
    动态添加的控件值也都可以获取么?
      

  7.   

    改的话,难度不大,并且,asp在asp.net中 也可以调用。js基本不用改。
      

  8.   

    LZ可以像ASP中那样来构造字符串,然后,再能过JS来写到UI层.
      

  9.   

    之前这个也是我做的,主要是原先那种方法太麻烦了,想在.Net结合JS有没有更好一点的办法~
    看来也只能用笨办法了....唉
      

  10.   

    參考例子for (int i=0;i<myDataGrid.Items.Count;i++)
    {

    RadioButtonList rbls=(RadioButtonList)myDataGrid.Items[i].FindControl("RadioButtonList1");
    TextBox tb=(TextBox)myDataGrid.Items[i].FindControl("TextBox1");
    string sql1="update hr163 set hr163.reg_sign=hr163.reg_sign||','||"+Request["id1"]+",hr163.num1_163='"+tb.Text.ToString()+"' where pemn='"+myDataGrid.Items[i].Cells[0].Text.ToString()+"' and hr163.id1 in (select hr162.id1 from hr162 where hr162.id2="+Request["id2"]+") and "+rbls.SelectedItem.Value.ToString()+"=1";
    string sql2="update hr163 set hr163.num1_163='"+tb.Text.ToString()+"' where pemn='"+myDataGrid.Items[i].Cells[0].Text.ToString()+"' and hr163.id1 in (select hr162.id1 from hr162 where hr162.id2="+Request["id2"]+")";
    Excute(sql1);
    Excute(sql2);
    Response.Write( "<script>alert(\"评分成功!!\");window.location='pingfen.aspx?id1="+Request["id1"]+"&&id2="+Request["id2"]+"';</script>");

    }