CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Theunis

Print topic Send  topic

Author Message
Add Custom HTML to a Page
Posted: 08/22/2005, 6:47 PM

I'm struggling with the example below and just get a variable not defined, I tried setting it both the page and lable before show event (seems the manual example is not even sure where to place it - it says the lable event but shows the example as being in the page load event?)

Anyone that can maybe point me in the right direction please?


Add Custom HTML to a Page
This example shows how to display custom HTML dynamically using a Label control.

Add a Label control called CustomHTML.
Set the Content property of the Label to HTML.
In the Before Show event of the Label, add the code below:
ASP
Function Page_BeforeShow()

CustomHTML.Value="MyData <table><tr><td>Data 1</td><td>Data 2</td></tr></table>"

End Function
Edd


Posts: 547
Posted: 08/22/2005, 11:32 PM

Right Code wrong event

Try moving the code to the beforeShow event of the CustomHTML Label not the Page
_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
Theunis
Posted: 08/23/2005, 11:31 AM

Edd, I tried that same result - variable not defined - strangely enough if I look in the main ASP code I can see where the variable is Dim'med?!

DonB
Posted: 08/23/2005, 1:12 PM

When assigning a value in the Label's before show event, the best way to do
it is:

Eventcaller.Value = "XYZ"

Dectermining the actual 'path' (the chain of object references) can be
tricky for the uninitiated. 'Eventcaller' eliminates the confusion. The
correct object reference is affected by whether the Label is inside another
container (like a Record form) or if it's sitting all alone in the Page.

Using 'Eventcaller' also means the code continues to work even if you rename
or move the control in the future.

--
DonB

http://www.gotodon.com/ccbth


"Theunis" <Theunis@forum.codecharge> wrote in message
news:6430b6b9f8d8cb@news.codecharge.com...
> Edd, I tried that same result - variable not defined - strangely enough if
I
> look in the main ASP code I can see where the variable is Dim'med?!
>
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


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.