ListBox Web控件C# [英] ListBox Web Control C#
问题描述
亲爱的所有人
我有一个列表框控件,其中的数据来自表States.表只有一列.数据以这种方式存储
Dear All
I have a listbox control in which data comes from table States . Table has only one column . Data is stored like this
PB
HR
CHD
DEL
现在,在列表框控件的窗体中,它将显示所有这4条记录.我希望除了这些Listbox控件之外,ListBox控件的末尾应显示"New",当用户单击"New"时,它应打开"New States创建"的形式并允许添加新State,然后更新列表框.如何使用C#?
谢谢
未选中的复选框"仅纯文本.忽略HTML标签和实体." [/EDIT]
Now in the form in the listbox control it will display all these 4 records . I want in addition to these Listbox control should display "New" at the end in ListBox , when user click on New it should open a form of New States creation and allow to add a new State , and then update the list box. How is it possible using C#?
Thanks
Unchecked Checkbox ''Plain text only. Ignore HTML tags and entities'' [/EDIT]
推荐答案
只需使用UNION子句在源查询中添加带有新建"的行.
Just add a row to the source query with ''New'' by using a UNION clause.
是否可以将控件放置在按钮或文本框类型的列表框下面?您甚至可以创建自己的用户控件,将这两个控件组合在一起以进行格式化.无论如何,这就是我的意愿.
Can you just position a control under the listbox, of type button or textbox? You could even create your own user control that combines these 2 for formatting purposes. This is how I would to it anyhow.
这篇关于ListBox Web控件C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!