文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Asp.Net Repeater中使用Button控件并响应单击操作的方法

Asp.Net Repeater中使用Button控件并响应单击操作的方法

时间:2011-01-11  来源:卢青松

代码
 protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
string[] s = new string[] { "1", "2", "3", "4", "5" };

this.rptTest.DataSource = s;
this.rptTest.DataBind();
}
}
protected void TestBtn(object sender, EventArgs e)
{
Button bt = sender as Button;

RepeaterItem ri = bt.Parent as RepeaterItem;

TextBox tx = ri.FindControl("txt") as TextBox;
if (!object.Equals(tx, null))
{
Response.Write(tx.Text);
}

}


 

相关阅读 更多 +
排行榜 更多 +
《师父》扮演星球大战阿纳金MOD

《师父》扮演星球大战阿纳金MOD

下载
《逃离鸭科夫》鸭子饮品包MOD

《逃离鸭科夫》鸭子饮品包MOD

下载
《逃离鸭科夫》子弹时间MOD

《逃离鸭科夫》子弹时间MOD

下载