How to show image from xml in html div after dropdown selected value change

Posted by Pcjoshi under jQuery on 6/13/2013 | Points: 10 | Views : 1461 | Status : [Member] | Replies : 1
hi,
i want to like this link. Is it possible to make like this using jquery image and dropdown value comes from xml.
http://jsfiddle.net/ZFpQh/7/




Responses

Posted by: Allemahesh on: 6/13/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
Yes, This is possible by using Jquery image and droupdown value comes from xml.

1. You need to bind the Drop-Down list to XML data. Use the below code for the this:-

DataSet dsDept = new DataSet();
dsDept.ReadXml(Server.MapPath("Departments.xml"));
DrpDepartment.DataSource = dsDept;
DrpDepartment.DataTextField = "deptName";
DrpDepartment.DataValueField = "deptId";
DrpDepartment.DataBind();
DrpDepartment.Items.Insert(0, new ListItem("-- Select --", "0"));

2. For the image display according to Drop-down selected value, you can use the below link:-
http://jsfiddle.net/ZFpQh/7/

Hope this will help you.

Pcjoshi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response