Back to
swartzentruber.net
 

Code Examples in VB.NET (Framework 1.1)

Code Samples Home


cachemanager

createlinkspagewithxml

hideorshowaddnew

lookupusercontrolwithevents

lookupusercontrolwithevents2

looplistboxforselected

tourcalendarinternational

tourcalendarwithdetail

tourcalendarwithdetail2

tourcalendarwithdetail3

usercontrol_sessionview

usertablestoarraylist_via_sqldmo

Hide or Show "Add New" Functionality
ASPX Code
<p><br><asp:Button id="btnAdd" onclick="btnAdd_OnClick" Runat="server" Text="Show Add New"></asp:Button></p>
<br><asp:Panel ID="panAdd" Runat="server" Visible="False"></asp:Panel>
VB.NET Codebehind Code
Protected Sub btnAdd_OnClick(ByVal sender As Object, ByVal e As EventArgs)
    If btnAdd.Text = "Hide Add New" Then
        panAddNew.Visible = False
        btnAdd.Text = "Show Add New"
    Else
        panAddNew.Visible = True
        btnAdd.Text = "Hide Add New"
    End If
End Sub

© 1999-2008 swartzentruber.net