繁体   English   中英

从动态生成的文本框中获取文本以使用按钮插入

[英]Get text from dynamically-generated textbox to insert with button

我正在创建带有文本框和每个按钮的div。 它们是这样创建的:

TextBox txtGosto = new TextBox();
txtGosto.ID = "txtGosto_" + postid;

然后,在其后带有EventHandler的按钮提交文本。

btnInsertPost.ID = "btnInsertPost_" + postid;
btnInsertPost.Click += (sender, e) => { InsertPost(sender, e, postid); };

该postid正在运行并作为参数传递,但是我想知道如何从动态生成的文本框中获取文本并提交。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM