Control literals on pages

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 лет назад
I've been struggling to find some way to remove literals on specific pages without impacting the entire site; for example, (I've posted this elsewhere, and thanks to those who responded) I want to limit which page the short description appears, and possibly other literals.
In doing this, the idea is to remove the short description from the categories/productsInGrid.ascx, while retaining it in the individual product pages.

To do this, I commented the short description literal tag from the .ascx page and the .cs file binding sub, and rebuild the project. The result is always an error indicating a null reference exception (object reference not set to an instance of the object).

No matter whether I comment both places or individual locations, the error is the same.

Suggestions have been to simply move the containing div to the bottom of the .ascx page and set the visible property to hidden; or set the visible property of the literal to false. Each of these attempts result in two different renderings:

Moving the div and hiding it does not remove the size dimensions, and results in the short description running off the bottom of the page, albeit the text is hidden, but the layout of the site is disrupted.
Setting the control to hidden results in the short description dimensions remaining in the original position on all pages it is used.

The only way to resolve this was to remove the short description entirely from all products, which makes it unavailable through the entire site.

This seems rather inflexible, and definately impacts the over-all application.

Many thanks for any help you can offer!
13 лет назад
Any ideas about how to get this done?

Thanks!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.