\[code\]<%# Product product = DataAccessContext.ProductRepository.GetOne(StoreContext.Culture, Eval("ProductId").ToString(), new StoreRetriever().GetCurrentStoreID()) string choppedProductName = Eval("Name").ToString().Replace(" count", "") string tempProductCount = choppedProductName.Substring(choppedProductName.Length - 3,3) string productCount = tempProductCount.Trim()string imgUrl = product.ImageSecondary.Replace("_s", "") %>\[/code\]This code produces: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.Fair enough. The productId and Name variables come from a gridview datasource\[code\]<asp:ObjectDataSource ID="OrderItemsSource" runat="server" SelectMethod="OrderItemGetByOrderID" TypeName="Vevo.Domain.DataSources.OrdersDataSource"> <selectparameters> <asp:QueryStringParameter Name="orderID" QueryStringField="OrderID" Type="String" /> </selectparameters> </asp:ObjectDataSource>\[/code\]And here is the gridview declaration:\[code\]<asp:GridView ID="uxOrderItemsGrid" runat="server" AutoGenerateColumns="False" DataSourceID="OrderItemsSource" CellPadding="0" GridLines="None" CssClass="CheckoutCompleteGridView">\[/code\]How do I use the ProductId and Name variable in the C# code block?