Hide button outside update panel in asp.net

Posted By  RaviChandra On 16 Sep 2010 08:09:03
emailbookmarkadd commentsprint
No of Views:2605
Bookmarked:0 times
Votes:0 times

Introduction

In this tip, i will show you how to hide the button outside the update panel. Sometimes we want to hide the a control inside the update panel. so that time we can't hide directly. for that we have to use this code snippet to perform.

Code

Protected Sub showhide(ByVal count As Integer)

        If count > 0 Then

            ScriptManager.RegisterStartupScript(Me, Me.GetType(), "", "document.getElementById('" + Button1.ClientID + "').style.visibility='visible';", True)

 

        Else

            ScriptManager.RegisterStartupScript(Me, Me.GetType(), "", "document.getElementById('" + Button1.ClientID + "').style.visibility='hidden';", True)

        End If

    End Sub

 

i hope this is help you.

Sign Up to vote for this article
Other popular Tips/Tricks
Comments
By:EddyDate Of Posted:2/6/2013 3:21:52 PM
Error 1
Interop type 'Microsoft.Office.Interop.Word.ApplicationClass' cannot be embedded. Use the applicable interface instead.
By:VDate Of Posted:8/31/2012 2:06:30 PM
Nice and useful.
Very nice and useful tutorial! Thanks! For newbies, here are some tips, as code as displayed will not compile. 1. You need to change the "List" type there to System.Collections.Generic.List; else you will have an error. 2. When referring to "autoshapes" and other figures that are NOT images, use the "Shapes" structure, instead of "InlineShapes". 3. This function: if (data.GetDataPresent(typeof(System.Drawing.Bitmap))) will not always be true. Make sure you know what are the available formats in your "data" object - data.GetFormats(true), before retrieving the specific data type in "GetDataPresent". Hope this helps! And thanks for posting this.
By:CrowelDate Of Posted:2/15/2012 11:26:24 PM
C# Image
Nice tutorial Here is the way to retrieve image from Database http://net-informations.com/vbprj/dataset/retrieve-image.htm cr.
By:xgShiDate Of Posted:10/24/2010 11:13:51 PM
Good job!
it's so concrete references.thank u very much!
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top