Click here to Skip to main content
15,942,710 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have image with numbers...and i want to highlight that number which is searched from how can i do this using c# in website??

What i want is when user search number that number in image should be highlighted...

What I have tried:

I tried to search about it..but i have no idea how i solve this question.
Updated 16-Sep-16 4:23am

When user search an number , then on replace the div (container) where the current image is placed with new image(highlighted image)

var src = $(this).attr('src');
  $('#show img').attr('src',src);

You have to name your id in such way that its in sync with number you have searched.

Bottom line,
1) find the image searched based on the number entered (use one to one relation for searched number and id of the element)
2) swap the image with highlighted image.
Share this answer
As i know you have 2 approaches:

1- you already know the numbers in image and their exact places. then you can use the Solution 2. means that you can show/hide images based on what users search.

2- you do not already know the numbers in images and you want to search in images for requested numbers. and show the results. in this case you need to google for OCR (Optical Character Recognition). its not an easy choice. you can also read more about it here:[^]

Optical Character Recognition[^]
Share this answer

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