如何在asp.net中首先显示空白图像 [英] how to display blank image first in asp.net

查看:64
本文介绍了如何在asp.net中首先显示空白图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述







plaese帮我朋友,



任何产品图片都是空白图片那些产品图片首先显示在我的网页上。




plaese help me friend,

any product image are blank image those product image are display first in my webpage.

推荐答案

请看下面的例子



http:// www.aspsnippets.com/Articles/Display-images-from-SQL-Server-Database-in-ASP.Net-GridView-control.aspx [ ^ ]



在您的问题中,您可以更改SQL查询以获取空白图像。



please see the Example below

http://www.aspsnippets.com/Articles/Display-images-from-SQL-Server-Database-in-ASP.Net-GridView-control.aspx[^]

In your problem, you can change the SQL query to get blank images first.

select * From [YourTable]
ORDER BY CASE WHEN [ImagePathField] IS NULL THEN 0 ELSE 1 END, [ImagePathField] 





小表的示例。





Example for Small table.

select * From Emp1
ORDER BY CASE WHEN Name IS NULL THEN 0 ELSE 1 END, Name







使用此项并首先看到SQL结果是否正确。您需要在输出中首先出现空值。



如果您有帮助,请标记为已回复。




Use This and first see the SQL result is correct. You need to come null values first in the output.

Please Marked as Answered, if you got a help.


这篇关于如何在asp.net中首先显示空白图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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