0

I have a repeater, that is bound is the level is equal to one, this works great, however if the level is equal to something else, I print out a blank line. How do I get it to not print out anything if Level != 1?

<%# ((programsRepeat)Container.DataItem).Level == 1 ? ((programsRepeat)Container.DataItem).ProgramName : "" %>  

1 Answer 1

1

Suggestions:

  1. Modify your query (filter WHERE level = 1)
  2. Use code-behind (datatable, etc.) to modify your dataset prior to binding it to the repeater
  3. Use the databinding event (http://msdn.microsoft.com/en-us/library/system.web.ui.control.databinding%28v=vs.110%29.aspx)

...

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.