c# - render conditional asp:content -
i need render conditional asp:content how can please?
**if( culture=fr)** <asp:content contentplaceholderid="altcolumncontent" id="altcolcontent" runat="server"> <div class="altbloc"> content 1 </div> <!-- end: alternative bloc --> </asp:content> **if(culture=en)** <asp:content contentplaceholderid="altcolumncontent" id="altcolcontent" runat="server"> <div class="altbloc"> content 2 </div> </asp:content>
when, put 2 asp:content same contentplaceholderid have erros.
regards
if want change content based on culture property value, there no need render different content tags, , better move if statement inside , render different content inside based on culture value?
this pseudo-block demonstration
<asp:content contentplaceholderid="altcolumncontent" id="altcolcontent" runat="server"> <div class="altbloc"> <% if(culturevalue == first_value){ %> content 1 ==> // your_first_content <%} else { %> content 2 ==> // your_second_content <%} %> </div> </asp:content>
Comments
Post a Comment