Wrox Programmer Forums
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 21st, 2009, 03:00 PM
Authorized User
Join Date: Dec 2005
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Question Hide areas

I have a form on a classic .asp page. The fields on the form vary from user to user.

For example:

Jane Doe signs in...she sees
Customer Name __________
Customer ID __________
Phone # __________
NA __________

John Public signs in...he sees

Customer Name: ________
Account Number: ________
Phone # ________
Email Address ________

The underlines represent text boxes in my form. The labels are generated through .asp and a SQL database from customer to customer. Is there any way where there is a "NA" as a label that I can hide both the "NA" and the associated textbox?

I know you can hide or show an area is a database is/isn't empty. Can I use the same type of programming if the field label is equal to "NA"?

Thanks in advance!
Old January 21st, 2009, 04:24 PM
Friend of Wrox
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts

Maybe you need to show some of your existing code.

This doesn't even "feel" like an ASP question to me, since obviously you could simply do
<input type=hidden name="NA" value="<%=RS("NA")%>" >
in HTML code.

Are you auto-generating the form, using the DB field names??? If so, you could simply do
Set RS = conn.Execute("SELECT * FROM table WHERE someid = " & someid )
For fnum = 0 To RS.Fields.Count-1
    Set fld = RS.Fields(fnum)
    If UCase(fld.Name) = "NA" Then
        <input type=hidden name="NA" value="<%=fld.Value%>" >
    <%=fld.Name%>: <input name="<%=fld.Name%>" value="<%=fld.Value%>" >
    End If
But, really, maybe you need to show code????

Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie - grouping from different areas? wilgartw XSLT 5 October 30th, 2007 09:46 AM
Aligning two chart plot areas - simple but tricky! Alseikhan Excel VBA 0 March 20th, 2006 07:18 PM
Linking to specific areas in a new page CathyM BOOK: Beginning ASP 3.0 2 August 2nd, 2005 09:23 AM
Formatting Areas happyslug BOOK: Professional Crystal Reports for VS.NET 2 January 20th, 2005 01:22 PM
Login Page going to 3 different management areas stacy Classic ASP Databases 1 January 21st, 2004 09:18 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.