Click here to Skip to main content
15,913,722 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi friends good afternoon every one.i am displaying message using asp.net label but i need to visible false the label automatically.The label is in updatepanel with out update panel i am using script i can disable the message but while using ajax it is not working can any one say how can i do it.....
Posted
Comments
CHill60 9-Apr-13 6:21am    
Please use the Improve question link to post the code that isn't working and explain what you mean by "not working"
kishore sharma 9-Apr-13 7:19am    
need more clear texts in your question,do you need to hide after postback???
Please make clear
Thanks

C#
Label1.Visible = false;
UpdatePanel1.Update();
 
Share this answer
 
What i am understanding is ,you are hiding the label when page loads or before postback using javascript but same javascript is not working after postback.
if this is the case then keep your javascript inside the following add_endRequest function and check.
XML
<script type="text/javascript">

               var prm = Sys.WebForms.PageRequestManager.getInstance();
               prm.add_endRequest(function () {
     //put your javascript here to hide the label
 });
                
            </script>



Thanks
Happy coding
 
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