如何计算在datagrid文本框中输入的字符数

问题描述:

亲爱的所有人,



请建议计算输入数据网格文本框的字符数。



谢谢。

Dear All,

Kindly suggest to count the number of characters entered into datagrid textbox.

Thanks.

如果我已正确理解你的问题,那就很简单了,请参阅:

If I've understood your question correctly then it's pretty simple, see :
TextBox txt = GridView1.FindControl("TextBox1") as TextBox;
int len = txt.Text.Length;