如何在repeater / gridview中显示从数据库中获取的资源键的值 [英] How to show value of resource key fetched from database in repeater/gridview

查看:62
本文介绍了如何在repeater / gridview中显示从数据库中获取的资源键的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过以下<%$ Resources:Class,ResourceKey%>我想在转发器或gridview中显示ResourceKey的值。

我的类名是Notification,KeyName是MyKey。我已将密钥名称存储在数据库中,并且我能够从数据库中获取密钥名称。但是无法在转发器中显示标签控制中的键值。我按照语法<%$ Resources:Class,ResourceKey%>



我试过< asp:Label ID =Label1runat =serverText ='<%$资源:通知,评估(MyKey)%>'/>但它不起作用。

请帮我解决这个问题。

By following <%$ Resources:Class, ResourceKey %> I want to show the value of "ResourceKey" in repeater or gridview.
My class name is "Notification" and KeyName is "MyKey". I have stored the key name in database and i am able to get the key name from database. But not able to show the value of key in label control in repeater. I followed the syntax <%$ Resources:Class, ResourceKey %>

I tried <asp:Label ID="Label1" runat="server" Text='<%$ Resources:Notification,Eval("MyKey") %>' /> but it doesn't work.
Please help me to resolve this issue.

推荐答案

资源:Class,ResourceKey%>我想在转发器或gridview中显示ResourceKey的值。

我的类名是Notification,KeyName是MyKey。我已将密钥名称存储在数据库中,并且我能够从数据库中获取密钥名称。但是无法在转发器中显示标签控制中的键值。我遵循语法<%
Resources:Class, ResourceKey %> I want to show the value of "ResourceKey" in repeater or gridview.
My class name is "Notification" and KeyName is "MyKey". I have stored the key name in database and i am able to get the key name from database. But not able to show the value of key in label control in repeater. I followed the syntax <%


资源:Class,ResourceKey%>



我试过< asp:标签ID =Label1runat =serverText ='<%
Resources:Class, ResourceKey %>

I tried <asp:Label ID="Label1" runat="server" Text='<%


资源:通知,Eval(MyKey)%>'/>但它不起作用。

请帮我解决这个问题。
Resources:Notification,Eval("MyKey") %>' /> but it doesn't work.
Please help me to resolve this issue.


这篇关于如何在repeater / gridview中显示从数据库中获取的资源键的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆