Click here to Skip to main content
16,018,904 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a field named Image in my database.i want to load the image directly from the database.I gave the template like
C#
{ field: "Image", title: "image", template:"<img src ='#= Image #'/>"},

it is displaying like image with cross mark.can u please tell me how to get the image?
Posted
Updated 28-May-12 18:18pm
v2

1 solution

Put inside folder all the img folder

C#
string filename = Path.GetFileName(LogoUploder.PostedFile.FileName);

            if (filename == "")
            {
                filename = "NOIMAGE.jpg";
            }
            else
            {
                LogoUploder.SaveAs(Server.MapPath(&quot;LOGOS/&quot; + filename));
            }
 
Share this answer
 
v2

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