Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to associate the input text in textbox with images.
For example, if I put in the textbox the letter "A" it displays an image of an apple, which is called "A.jpg". If I put in the textbox the letter "B", an image may be a ball, which is called "B.jpg". If the textbox contains the text "ABC" it displayed simultaneously in a series of three images associated with those letters.
Posted
Updated 10-Nov-10 8:59am
v2

This sounds a bit like a homework question.

If there is any possibility of using something other than a TextBox, it seems to me that a CheckedListBox would be a better option.

Is there any possibility of doing that?
 
Share this answer
 
Try this

make auto post back of the textbox = true
and then on textbinding event of the textbox write the function
put an image control on the page to show the image.

private void textbinding(object sender, eventargs e)
{
imagecontrol.url = textbox.text+".jpg";

}

hope this solves your question.
 
Share this answer
 
Comments
Indivara 10-Nov-10 23:00pm    
What about the ABC part then? OK, I suppose you are only demonstrating the principle...

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