CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Hiding include pages

Print topic Send  topic

Author Message
Chadly
Posted: 09/26/2003, 7:16 AM

I am converting my applications to asp.net vb.
I have been using this function to hide the header in asp 3.0 with templates.

if UCase(CCGetParam("pop","")) = UCase("yes") then
Header.Visible = False
end if

I get the following error.
________________________________________________________________________

C:\DOCUME~1\Chad\LOCALS~1\Temp\~Bidding\Header.ascx.vb(144) : error BC30456: 'Visible' is not a member of 'Header'.
Header.Visible = false
~~~~~~~~~~~~~~
C:\DOCUME~1\Chad\LOCALS~1\Temp\~Bidding>REM _End MakeAll
_______________________________________________________________________


Is there another way to hide the header in asp.net vb?
Thanks
Karim
Posted: 09/26/2003, 7:29 AM

Chadly,

You need to reference the form as well. If your header is includable, then you should use the current form which you are adding your include and then header.visible = False

Hope that helps,
Karim
Chadly
Posted: 09/26/2003, 7:52 AM

Well, I don't understand what you mean. I used to put the above code into the header before show event. This way it was global to all pages. Do I need to add this to every page now? I have been fighting this since yesterday. I just can's seem to make it work. I am sure the solution is right in front of me, but I cannot find it. Can you be more specific on the solution?
Thanks for the quick response!!!!!
Karim
Posted: 09/26/2003, 8:24 AM

What is the page called that you are accessing the header? What function are you using, could you send a copy.

Karim
Chadly
Posted: 09/26/2003, 8:30 AM

Ok, I think I have what you were talking about. I put the navigation links that I am trying to hide (which are located in the header page) in a Form object. Then I reference <FormName>Holder.Visible = False and it works. Why do we use Holder though. Is this the correct way to do this?
When I just use the Form Name I get this error.

Name '<Form Name>' is not declared.

Please let me know if this is the correct method to use.

Thanks again.
Chadly
Posted: 09/27/2003, 10:31 AM

I have a page called Header(header.ccp) with its includable property set to true. It contains a JScript menu for navigating throughout the asp.net application. Every page in the application has the included file "Header.ccp" in it. Some times I am opening a page in a new window(Popup Window), but I don't want the user to have any navigation abilities(Via the JScript menu). In ASP 3.0 to hide the included page (Header.ccp), I used the Header_BeforeShow() event.
I would add the following code to the Header_Events.asp:

Function Header_BeforeShow() 'Header_BeforeShow @1-864E5C27

'Custom Code @36-73254650
' -------------------------
if UCase(CCGetParam("pop","")) = UCase("yes") then
Header.Visible = False
end if
' -------------------------
'End Custom Code

End Function 'Close Header_BeforeShow @1-54C34B28

This function will not compile under asp.net vb. What I have done for the mean time is put the JScript menu in a CCS Record Form named MainNav. I am now using the following code to accomplish the same thing as I was doing in asp 3.0 and put this code in the Header.ascx.vb file:

'Record MainNav Event BeforeShow. Action Custom Code @23-73254650
' -------------------------
if UCase(Request.QueryString("pop")) = UCase("yes") then
MainNavHolder.Visible = False
end if
' -------------------------
'End Record MainNav Event BeforeShow. Action Custom Code

Both these functions are contained in the Header page so it is basically global to all pages. This way if I open any page (for example Invoices.aspx) and use the parameter pop=yes, the header (menu) doesn't show. http://localhost/invoices.aspx?pop=yes

My questions:
1. Can I not set the visible property for Include pages anymore?

2. When I look at the documentation for the asp.net vb it says to set the visible property to false like this (FormName.Visible = False) The only way I have been able to do this is if I use the "Holder" keyword.(FormNameHOLDER.Visible = false) Am I setting this property correctly? If Not, What should I do?


Thank you again.
Karim
Posted: 09/27/2003, 4:38 PM

FYI:

Referencing Objects
The objects in the Web applications generated by CodeCharge Studio can be referenced in a variety of ways. In many cases, to work with a specific object within a program you will need to know its position within the program hierarchy. For example, an object that is placed directly on the page may need to be addressed differently compared to an object placed within a form (which is also an object).

ASP
Examples of working with objects Syntax
Form object placed in a page <form>.Visible = False
Control object placed within a form <form>.<control>.Value = "123"
Control object placed in a page <control>.Value = "ABC"
Control object placed in an included page <page>.<control>.Visible = False
Form object is placed in an included page <page>.<form>.Visible = False
Control object placed in a form within an included page <page>.<form>.<control>.Visible = False
Assigning an object to a variable Set <variable> = <object>
Generic addressing of the current object EventCaller.Value = "123"

Note: When using ASP/VBScript you can refer to objects in a generic way as "EventCaller". This may be beneficial for example when renaming objects, since the object's name would not be used in the code.


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.