none
Hide space between details view when datasource empty RRS feed

  • Question

  • 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?

    Sunday, October 7, 2018 11:50 PM

All replies

  • Hi,

    According to your description, your issue is more related about asp.net. And this forum is discussing and

    asking questions about the vb.net.

    Ask in the following forum.

    https://forums.asp.net/

    Thank you for your understanding.

    Thank you for participating in the forum activities.

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, October 8, 2018 6:39 AM