我需要知道文本框中的总数 [英] I need to know the total count in the textbox

查看:64
本文介绍了我需要知道文本框中的总数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以告诉我如何获取文本框中列表框的项总数.请使用编码简要说明一下.\

can someone pls tell me how can i get the total count of items of listbox in the textbox. pls explian me briefly with coding.\

推荐答案

大多数项目集合都具有count属性.
从该属性中获取计数,然后将其显示在文本框中.

t.Text = collections.Count
Most item collections have a count property.
Pick up the count from this property and then display it in your text box.

t.Text = collections.Count


向您的查询添加输出参数以获取从数据库检索到的行数.然后使用该输出参数.

Add an output parameter to your query to get the number of rows retrieved from database. Then use that output parameter.

@Count int OUTPUT

SELECT * FROM list

SET @Count = @@RowCount



问候,
爱德华



Regards,
Eduard


非常简单.使用以下代码:
It''s very easy. Use the following code :
TextBox1.Text = ListBox1.Items.Count 'Returns no of Items present in ListBox


希望对您有帮助. :)
-MKB


I hope it will help you. :)
-MKB


这篇关于我需要知道文本框中的总数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆