
March 21st, 2009, 11:03 AM
|
|
|
Quote: | Originally Posted by sasil hi frnds,
i have one search page with two categories (i)Forums (ii)Blogs.
If i enter search string in textbox and check "Forums" category then click search button it returns forums topics, for that i wrote coding
Code:
<td>
<h2>
<a href='<%#forums.ForumsUtilities.GetForumURL(Eval("TopicID"),
Eval("Subject")) %>'><%# Eval("Subject") %></a>
</h2>
</td>
If i check "Blogs" then need to return blog topics in same repeater.
How to do that anyone have idea inform me... how to use if statement in Inline code.The code for blogs is,
Code:
<td>
<h2>
<a href='<%#forums.ForumsUtilities.GetBlogURL(Eval("TopicID"), Eval("Subject")) %>'><%# Eval("Subject") %></a>
</h2>
</td>
|
You should be using code-behind and not inline code.
Inline code is a nightmare to maintain, and does not properly separate the presentation from the data.
|