我試圖將資源鍵添加到網格視圖的標題文本,但經過很長時間後,我無法管理此問題。使用資源鍵的綁定字段中的標題文本
我已經試過編碼,如:
<asp:BoundField DataField="CategoryName" HeaderText="<%$ Resources:ViewTC_CourseCategory,HeaderCategoryName %>"
ItemStyle-Width="12">
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
我的資源文件中包含如下值:
HeaderCategoryName.Text Category Name
它顯示了以下錯誤:The resource object with key 'HeaderCategoryName' was not found
什麼是實現這個正確的方法需求。一定幫助。
你能告訴你的資源文件和GridView所在頁面的名稱是什麼? –
資源文件名稱:ViewTC_CourseCategory.ascx.resx頁面名稱:ViewTC_CourseCategory.aspx – Abhishek
我試着實現這個:」 ItemStyle-Width =「12」> asp:BoundField> –
Abhishek