CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Codecharge - ASP - Show or hide url link

Print topic Send  topic

Author Message
Geary
Posted: 11/06/2003, 6:46 AM

Anyone know how i can show or hide the URL link on a grid list page based on if a website or email address was entered into the database when the record was created?


Currently, the link shows up regardless if the website or email was entered...

I'm using Codecharge 2.0, ASP w/ templates


TIA
Geary
Hamilton
Posted: 11/06/2003, 7:31 PM

The easiest way to perform this is to change the link to a label control.
In the Before_Show event do the following;

Dim lngRecordID
Dim sWebsite
Dim sEmail
Dim sResult


lngRecordID = Users.DataSource.Recordset.Fields("user_id")
sWebsite = Users.DataSource.Recordset.Fields("Website")
sEmail = Users.DataSource.Recordset.Fields("Email")

If Len(sWebsite) > 0 then sResult = sWebsite
If Len(sEmail) > 0 Then sResult = sEmail

'Or modify this to accomdate if the user provided both
If Len(sWebsite) > 0 AND Len(sEmail) > 0 Then
sResult = sWebsite & "<BR>" & sEmail
End If

Users.lblEContact.value = sResult
Hamilton
www.dataobjx.net

   


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

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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