Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In the if condition,at the return statement if we give the the image path, then the image will be loaded or not?
for example:
C#
if (status == "1")
            return "<img src=C:\Users\bhuvisdesktop2.BHUVIS\Desktop\kendoui grid/>";


if not, then how to give the path
Posted
Comments
Technoses 26-May-12 6:17am    
first of all
this is not a statement of return image
it returns only a string
you can place it any where in html page

second
where you want to write this code??
js
or
C#

No.
All that is doing is returning a string containing a chunk of HTML.
Unless you output the string later to your page via Response.Write it will not do anything to your page.
What are you trying to achieve, that you think this will help?
 
Share this answer
 
Comments
charan1431 26-May-12 6:34am    
I am working on ASP.NET mvc3.I used a checkbox in my application.If the checkbox value is true then it has to display the image using the image path.how i have to get the image in the if statement.
first of all
this is not a statement of return image
it returns only a string
you can place it any where in html page

second
where you want to write this code??
js
or
C#
 
Share this answer
 
Comments
charan1431 26-May-12 6:39am    
I am working on ASP.NET mvc3.I used a checkbox in my application.If the checkbox value is true then it has to display the image using the image path.how i have to get the image in the if statement.
charan1431 26-May-12 8:12am    
I am getting an default image,but it is not displaying the actual image

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900