Click here to Skip to main content
15,894,825 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
SQL
http://i.stack.imgur.com/iADOU.png

 Description:
                above image will give some details. in my table i want expand and collapse in same place.if we use MVC we edit the code in INDEX code page. where we write code in index page how i set both icon +.- in samer place
Posted
Comments
ashok rathod 10-Jul-14 6:49am    
you can set image's visibility property to hidden and on click change them to + or -
JOTHI KUMAR Member 10918227 10-Jul-14 7:09am    
how to set let me explain plzzz

Cant you just change the image buttons ImageURL property or the src attribute of the image to be the new icon in the on click event?

something like:
fyi i'm an asp.net guy not mvc so the example may not be correct for what you're doing

protected button_click(object sender, EventArgs e)
{
if(img.ImageUrl.IndexOf("plus") > -1)//or have some other flag to determine which icon to show
img.ImageUrl = {path to minus icon}
else
img.ImageUrl = {path to plus icon}

//...do other button event stuff

}

again it may not work in mvc, i havent started playing with it yet but you should get the idea.
 
Share this answer
 
refer this link for manage collapsible content using javascript functionhttp://stackoverflow.com/questions/17268006/expand-and-collapse-using-javascript-with-and?rq=1[^]
 
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