Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Sweet Day
I need code of ASP.net thats when i click on button show to client
Picture or Text and when i click again to the same Button hide the picture or text
just i need this situation as soon as process
Posted
Comments
tanweer 4-Apr-12 6:58am    
hi, its very simple. Use a Div with display none and put your Picture or Text inside it and on Button click use JQuery toggle function to show or hide it.

HI @Ahamad

please refer the following code to resolve your Doubt


C#
int count=0;
onbutton_click event
{
if(count==0)
{
showyourFirstImages()
count=1;
}
else if(count==1)
{
showSecondImage();
count==0;
}
}

Hope this will help you.
this task can also be achived using the switch case.that will more esier for you

Thanks
 
Share this answer
 
v2
Comments
ahmad jadoa 9-Jul-12 9:33am    
Many Thanksssssssssssssssssss
This is really a very simple task.
You should read some basic tutorial on your favourite ASP.NET language.
 
Share this answer
 
Comments
Dalek Dave 4-Apr-12 7:05am    
I countered the downvote as you are perfectly right Carlo.
CPallini 4-Apr-12 8:00am    
Thank you very much.
have a look at:
How to slideUp & slideDown a div?...[^]
in this see first solution yoiu will get some idea
 
Share this answer
 
I think you should declare a boolean. Just toggle the state of that variable on every click and do your task on change.

Hope this is clear.... :)
 
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