Posted on: 9/25/2015 10:24:57 AM | Views : 873

I have a repeater control in a search page that is wrapped in a function to tidy the text, remove html, trim to set characters etc
This however causes adverse issues when i am returning search results to the repeater as these text elements are formatted elsewhere, to show highlighted words and have there own set character limit...
However on page load when there has not been a search done i would like the text tidy function to be there...
is there some way to do a conditional clause within the  repeater to detect if the search text box is empty and use this function else do not wrap the databound elements with it?
<%#TidyText(Convert.ToString(DataBinder.Eval(Container.DataItem, "ddBody"))).Trim()%>... <%#DisplayLinkTitle(Convert.ToInt32(DataBinder.Eval(Container.DataItem, "ddID")), Convert.ToString(DataBinder.Eval(Container.DataItem, "ddContentType" )), "Read more",Convert. ...

Go to the complete details ...