This is a migrated thread and some comments may be shown as answers.

Images in custom template

0 Answers 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jebamalai
Top achievements
Rank 1
Jebamalai asked on 18 Sep 2008, 11:07 AM
Dear All,

I have created a custom template which will hold an image.

The images were in the folder "images".

The images were also embedded web resource and it is in the assembly.

How can I bound the images to it.

I have specified the following codes but it is not embedding the images.

img.ImageUrl = instancePage.ClientScript.GetWebResourceUrl
                         (typeof(NewAdminTool), "MyApplicationName.Images." +
                         ((DataRowView)container.DataItem)["FileExtID"].ToString() + ".jpg");

(instancePage is the instance of the page which is passed from the page where the grid is.)

and

img.ImageUrl = Path.Combine(HttpContext.Current.Server.MapPath("Images"), ((DataRowView)container.DataItem)["checked"].ToString() + ".gif");

Thanks a lot in advance.

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Jebamalai
Top achievements
Rank 1
Share this question
or