首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

在ascx中如何获取后台遍历出来HtmlTextArea(多行文本域)的值并且把它传到aspx中

2013-08-24 
在ascx中怎么获取后台遍历出来HtmlTextArea(多行文本域)的值并且把它传到aspx中?public void Fill(int cou

在ascx中怎么获取后台遍历出来HtmlTextArea(多行文本域)的值并且把它传到aspx中?

public void Fill(int count,ArrayList sdf)   {       ArrayList ar = sdf;       Model.stock stockInfo = null;       for (int i = 0; i < ar.Count; i++)       {           stockInfo = Bll.Stock.GetStockByUUID(ar[i].ToString());           if (IsPostBack)           {               HtmlTextArea ht = new HtmlTextArea();               ht.ID ="stocs";               ht.Name = "hh" + i;               ht.InnerText = stockInfo.remark;               Panel1.Controls.Add(ht);           }       }   }

[解决办法]
用反射?
http://www.cnblogs.com/insus/archive/2013/03/09/2951668.html

用委托?
http://www.cnblogs.com/insus/archive/2011/11/16/2251314.html
http://www.cnblogs.com/insus/archive/2013/02/03/2890664.html

用接口(interface)?
http://www.cnblogs.com/insus/archive/2012/09/26/2703462.html


用接口(interface) + FindControl()方法?
http://www.cnblogs.com/insus/archive/2012/10/07/2713568.html

热点排行