Using C #, how can I read the contents of dynamically generated text fields?

Hy

I created some dynamic text fields with standard content.

Does anyone know how I can read the contents of these text fields (assuming the user has changed the standard content) when I click one button?

Many thanks.

Jeff

Update

This is how I create text fields:

foreach (string name in listOfNames)
{
   TextBox tb = new TextBox();
   tb.Text = name;
   tb.BorderStyle = BorderStyle.None;
   tb.BorderWidth = 0;
   tb.Font.Name = "Arial";
   tb.Font.Size = 8;
}
+2
source share
4 answers

The specific parameters depend on the technology you are using. However, the concept will remain very similar, although for ASP.NET it will be a little more interesting.

WinForms / WPF / Silverlight

, , Text, .

ASP.NET. , .

ASP.NET OnInit, . Button.Click , OnInit. , ID .

+3

, .

, .

- Init.

ASP.NET.


( )

, ID ( ), .

, .

+2

Request.Form - "-", , ASP.NET. , , , ASPX , .

, . , , ASP.NET .

0

, , . .

- asp.net

0

Source: https://habr.com/ru/post/1781463/


All Articles