-6

I want to write some property item to image. Though I could not do it. But I can edit any currently added property. So I want to know is there are any property item I can use for my purpose? Here are some Id I am getting:

Id:271
type 2

Id:272
type:2

Id:274
type:3

Id:282
type:5

Id:283
type:5

Id:296
type:3

Id:306
type:2
....

etc.

My question is can I use any of the currently present property?

Charles
  • 50,943
  • 13
  • 104
  • 142
Rashad
  • 11,057
  • 4
  • 45
  • 73
  • Do you want to give image a Id? Why not create a custom image class which wraps a image and necessary properties? – Sriram Sakthivel May 08 '14 at 06:03
  • I want to add 2 time stamp and photographer name to image metadata. For this purpose I want to use any of the currently added image PropertyItem. Is there any problem? – Rashad May 08 '14 at 06:07

1 Answers1

2

Sounds simple i think

<img id="myimage" data-id="data you want to pass"/>

if you want to add attribute from c# then

ddLedger.Attributes.Add('data-id','yourvalue');

So you want to access this property at backend c# then

string aa=myimage.attributes("data-id");

in string aa you will get your data....

and in jquery

$('#myimage').attr('data-id');

Now if you want to add it at run time then like this

$('#myimage').attr('data-id','your id added');

Demo

Check this url for more details https://stackoverflow.com/a/1735239/2630817

I hope this will help you....:)

Community
  • 1
  • 1
Just code
  • 13,553
  • 10
  • 51
  • 93