views:

60

answers:

1

here i need to replace content "says..." :

<asp:DataList ID="dlProductReviews" runat="server" RepeatDirection="Vertical" RepeatColumns="1">
  <ItemTemplate>
    <div>

      <span class="content">says... </span>

    </div>
  </ItemTemplate>
</asp:DataList>
+1  A: 

You can use the data binding tags here:

<asp:DataList ID="dlProductReviews" runat="server" RepeatDirection="Vertical" RepeatColumns="1">
  <ItemTemplate>
    <div>

      <span class="content"><%# GetContent() %></span>

    </div>
  </ItemTemplate>
</asp:DataList>

Then in your code behind create a protected method called GetContent()(or you could use a property) in the code behind that returns a string, in your case a string from the resources. You could also place the code directly in the <%#...%> tags.

Dan
this is inline aspx databinding i think,,so i need to do <%# Resources.Default. lblCustomerAction,,rite Dan?any way let me check
peter
yes that would work, but don't forget to fully qualify the Resources object with the namespace, or use the imports tag in the markup
Dan
but i think we need to use Getstring() method
peter
I am not sure what you mean by Getstring(), to you mean ToString()? Are you receiving an error?
Dan