网格视图asp.net [英] Grid view asp.net
问题描述
你好,
我的网格视图中有一列,该列从数据库中减去两列后得到值(以逗号分隔的方式绑定到网格).例如,我绑定电话号码. (从数据库中的移动号码和座机号码两列检索)到网格.现在,在浏览器上显示它时,我必须检查它们是否为空(数据库中的移动电话或座机).如果它们为空,则必须删除浏览器上显示的逗号.现在,显示格式为(手机号码,座机号码).请建议我该怎么做.
预先感谢.
Hello,
I have a column in my grid view which gets the value after concating two columns from the database(binded to the grid as comma separated). For instance, I am binding the phone no. (retrieved from two columns- mobile no. and Landline no. in the database.) to the grid. Now, while displaying it on the browser, I have to check whether any of them is empty(either mobile or landline in the database) If any of them is blank, then I have to remove the comma that is displayed on the browser. Now, the display format is (mobile no., landline no.). Please suggest me how can I do this.
Thanks in advance.
推荐答案
一种方法是在合并它之前对其进行处理-也许在数据库查询中.
One way could be to handle it before you merge it - perhaps in the database query.
这篇关于网格视图asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!