簡體   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