|
-
Jan 30th, 2004, 11:31 AM
#1
Thread Starter
Lively Member
Hiding ASP.NET User Controls
Hi,
I have an application that uses an ascx user control to show a header on a web page. This page gives the option to display the page in Excel, but when I do this I don't want the header to be there (there not in the web site any more so don't need the navigation).
I thought it would be as simple as putting header.visible = false somewhere in my code, but alas it's not.
Does anybody know how I can get round this?
Cheers,
AuldNick
-
Jan 30th, 2004, 11:12 PM
#2
Hyperactive Member
Hi, actually that should work;
I just used this piece of code to hide one of my user controls;
VB Code:
If Session("bAdmin") = 1 Then
UCAdmin1.Visible = False
End If
Have you declared the user control in the code behind page??
As in
Protected withevents UCAdmin1 as UCAdmin
hth
Cheers
MarkusJ
-
Feb 2nd, 2004, 04:29 AM
#3
Thread Starter
Lively Member
D'OH, Your right.
Cheers Mate
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|