troubleshooting Question

I want to elminate the space that is displayed between Multiple DetailViews if one is empty or NULL of values.

Avatar of derrekdeveloper
derrekdeveloperFlag for United States of America asked on
ASP.NETVB Script
3 Comments1 Solution123 ViewsLast Modified:
ASP.Net DetailsView question:
I have built an ASP.net page with Webforms and VB. I am passing a search parameter using a url value. On the results page I have multiple DetailView's. They are place one behind the other. Everything works fine but I want to eliminate the empty space when a data source connected to a DetailView is empty. Here is my example. The Header text says Behavior and Analysis:

Behavior and Analysis:
DetailView 1 - data source is not empty so display
DetailView 2 - data source is not empty so display
DetailView 3 - data source is empty
(Empty Spacing) After DetailView 3 there is empty space here (Empty Spacing)
DetailView 4 - data source is empty
(Empty Spacing) After DetailView 4 there is empty space here (Empty Spacing)
DetailView 5 - data source is not empty, display.

In my ASPx page there is space between the records displaying for DetailView 2 and DetailView 5 because even though no records are returned the DetailView Control still takes up space. How can I eliminate the empty space if the data source for DetailView 3 & 4 are empty? Basically, I want to eliminate the space between DetailViews id the data source is empty.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros