display text instead of image
-
Hi, I want to display some text inplace of image if image is not available, when we are retrieving image from database. anyone help me
Hi, What is the problem. Where you are displaying image. Can you figure out problem more Specifically..
To succeed, we must first believe that we can. Sherin Iranimose
-
Hi, I want to display some text inplace of image if image is not available, when we are retrieving image from database. anyone help me
Hi There is one attribute called as 'ALT' tag to describe your image. This means, that the text is meant to be used when the image is not visible on the page. Hope you got it. :)
Harini
-
Hi, What is the problem. Where you are displaying image. Can you figure out problem more Specifically..
To succeed, we must first believe that we can. Sherin Iranimose
-
Hi, I want to display that image in one form Just i want to display Image not available if there is no record in the database is it clear?
hi There is a property for asp Image control called altername text. This text will display if no image url specified. So set the url for ur image if it is availble only.
To succeed, we must first believe that we can. Sherin Iranimose
-
hi There is a property for asp Image control called altername text. This text will display if no image url specified. So set the url for ur image if it is availble only.
To succeed, we must first believe that we can. Sherin Iranimose
-
Write a function that checks the database value is empty. If empty then replace that with another image not found image. If you are binding data on datagrid then use itemdatabound event for setting the image.
private string GetImagePath(string DbValue)
{
string strReturn = string.Empty;
if ( DbValue == "" ){
strReturn = "YourNotFoundImage.gif";
}
else
strReturn = "CorrrectImage.gif";
}Call a function like this when data is binding from DB
Navaneeth My Website
-
Write a function that checks the database value is empty. If empty then replace that with another image not found image. If you are binding data on datagrid then use itemdatabound event for setting the image.
private string GetImagePath(string DbValue)
{
string strReturn = string.Empty;
if ( DbValue == "" ){
strReturn = "YourNotFoundImage.gif";
}
else
strReturn = "CorrrectImage.gif";
}Call a function like this when data is binding from DB
Navaneeth My Website
Hi, Thanks for u'r reply. But I am storing image as binary format in sql & retrieving like this . see this code Do While (myDataReader.Read()) Response.ContentType = myDataReader.Item(1) Response.BinaryWrite(myDataReader.Item(0)) Loop So How can i check recordcount
-
Hi, Thanks for u'r reply. But I am storing image as binary format in sql & retrieving like this . see this code Do While (myDataReader.Read()) Response.ContentType = myDataReader.Item(1) Response.BinaryWrite(myDataReader.Item(0)) Loop So How can i check recordcount
Hi, How you are checking image available or not the same method you can use in navaneeth's example...
To succeed, we must first believe that we can. Sherin Iranimose
-
Hi, Thanks for u'r reply. But I am storing image as binary format in sql & retrieving like this . see this code Do While (myDataReader.Read()) Response.ContentType = myDataReader.Item(1) Response.BinaryWrite(myDataReader.Item(0)) Loop So How can i check recordcount
What about converting binary to string and passing to the function ? Try This Link[^]