473,809 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can anyone point me in the right direction.

Hi all,
i want to display a list of specifications but only want them to be
displayed if
the returned value from the database is not "".
the only way i could think of was
If height <> "" then
showspec = showspec + "<TR><TD>specHe ight</TD><TD>" & height & "</TD></TR>"
end if

but this is a really had way of doing it (mixing design with logic)
can anyone maybe give me a clue to a better way to do it?

thanks in advance :)

marc
Nov 17 '05 #1
1 1027
There are a couple of ways I can think of:

1. Use a repeater. Not the most elegant solution, but easy to bind. You can
find how to set up conditional logic in other threads (groups.google. com is
your friend) :-)

2. Make a routine to create the table and bind to the page:

<%# =CreateTable() %>

CreateTable() can return nothing if there is no data.

3. Add a container to the page and bind a table to the container
programatically . An easy container to use is a Panel. You then create the
table and bind using:

PanelName.Contr ols.Add(TableCo ntrolName)

Once again, you can NOT build the table if there is no data.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** *************** *************** *************** **********
Think Outside the Box!
*************** *************** *************** *************** **********
"Marc Bishop" <no************ ******@hotmail. com> wrote in message
news:kY******** *****@news-binary.blueyond er.co.uk...
Hi all,
i want to display a list of specifications but only want them to be
displayed if
the returned value from the database is not "".
the only way i could think of was
If height <> "" then
showspec = showspec + "<TR><TD>specHe ight</TD><TD>" & height & "</TD></TR>" end if

but this is a really had way of doing it (mixing design with logic)
can anyone maybe give me a clue to a better way to do it?

thanks in advance :)

marc

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1456
by: Bill | last post by:
Is anyone using the SOAPpy library? I just started looking at this was was pretty impressed with how easy it is to set up a server, the readme gives a short example of a 'hello' sever/client. But I realized the server doesn't deal with multiple requests, if you set up a more serious and send something to the server, then a second, it waits until the first is completed. Now what I'd like to do is have it deal with multiple client at a...
1
1510
by: A. Name | last post by:
Can someone please point me in the right direction? This is what I want to accomplish. The page has a simple form for input on it. When a user enters in information and clicks the button, the current list of items is displayed. So, if the page looks like this: ----------------- | tweeking | Add
1
1465
by: james | last post by:
I am new to producing page layouts using pure CSS. I have made several atempts, but hailed, to acheive the following Fluid page design Header Container with a width of 100%. A content container on the left of the page with a fluid width. A right hand nav container with a fixed width. Footer Container with a width of 100% aligned to the bottom of the page
65
12636
by: Skybuck Flying | last post by:
Hi, I needed a method to determine if a point was on a line segment in 2D. So I googled for some help and so far I have evaluated two methods. The first method was only a formula, the second method was a piece of C code which turned out to be incorrect and incomplete but by modifieing it would still be usuable. The first method was this piece of text:
3
1677
by: Jheitmuller | last post by:
Hi, I would like to convert a VB.NET application from being a Windows app to an ASP.NET app. I'm new to web development, so this may be a simple question. Is it possible to render simple drawing commands in an ASP.NET application? Something line draw a line point to point, or draw a circle at this point. If so, can somebody point me toward the library or technique to use? I can figure it out if I can get pointed in the right...
2
446
by: Randy Fraser | last post by:
Is anyone using a datagrid for data entry? All I am trying to do is create a grid where the user enters an Item Number and the rest of the grid displays the information such as Description. Is anyone else doing this? If so, I would love it if you could point me in the right direction.
2
1317
by: Frank | last post by:
Hello, I need some pointing in the right direction. I have a working application, a main form and several subforms and classes. I want the subforms and classes put together in a package so that other programmers can use it in their main forms. Is the 'package' I'm looking for a component? Do you put this in a dll? When programmers use my package I want them to see the intellisense stuff belonging to it. The classes should not be visible...
1
1016
by: Mr. Analogy | last post by:
Hi, I reported a few bugs (...err... I mean "unintended effects") in vb.net on the MS site a few weeks ago: http://lab.msdn.microsoft.com/productfeedback/ Haven't heard back from MS, so wanted to check up. When I go to the above page, and click on the "report a bug" item in
5
2229
by: AManAfterGod | last post by:
OK, I'm fairly new to Java and I wanted to try if I could convert an easy Microsoft Excel problem into Java but I've hit a road block. I was wondering if one of you could point me in the right direction. I'm trying to write that would double pay everyday for 35 numbers and show the output as... You were paid $.01 on Day 1. Your total salary is $.01 You were paid $.02 on Day 2. Your total salary is $.03 You were paid $.04 on Day 3. Your...
2
1331
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, i have an excel file that contains employee information. inside the workbook there are numerous worksheets - one per employee. is it possible to iterate thru the workbook reading pieces of data by any chance? can somone please point me in the right direction? thanks, rodchar
0
10637
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10379
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10115
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9199
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3014
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.