如何在asp.net中设置treeview控件的本地化?
我想在 ASP.NET 控件树视图中设置本地化,任何人都可以指导我如何实现这一目标吗?
<asp:TreeView meta:resourcekey="TreeViewQ" ID="Q_View" runat="server">
<Nodes>
<asp:TreeNode Text="FirstNode" Value="1" >
<asp:TreeNode Text="child1" Value="2">
</asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="Secondnode" Value="3">
<asp:TreeNode Text="thirdnode" Value="4"></asp:TreeNode>
</asp:TreeNode>
</Nodes>
</asp:TreeView>
我想为树视图中节点的文本属性设置本地化。
更多需要补充的内容:-您从中推断出什么,我需要做这样的事情吗?
<asp:Wizard ID="Wizard1"
runat="server"
meta:resourcekey="Wizard1Resource1">
<NavigationStyle
BorderWidth="<%$ resources:navBorderWidth %>"/>
<WizardSteps>
<asp:WizardStep ID="WizardStep1"
runat="server"
Title="Step 1"
meta:resourcekey="WizardStep1Resource1">
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
i want to set the localizaiton in the asp.net control Tree view, could any body guide me how to achieve this?
<asp:TreeView meta:resourcekey="TreeViewQ" ID="Q_View" runat="server">
<Nodes>
<asp:TreeNode Text="FirstNode" Value="1" >
<asp:TreeNode Text="child1" Value="2">
</asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="Secondnode" Value="3">
<asp:TreeNode Text="thirdnode" Value="4"></asp:TreeNode>
</asp:TreeNode>
</Nodes>
</asp:TreeView>
i want to set localization for text property of node in the tree view.
Some More to add:- what do you infer from this, do i need to do something like this.
<asp:Wizard ID="Wizard1"
runat="server"
meta:resourcekey="Wizard1Resource1">
<NavigationStyle
BorderWidth="<%$ resources:navBorderWidth %>"/>
<WizardSteps>
<asp:WizardStep ID="WizardStep1"
runat="server"
Title="Step 1"
meta:resourcekey="WizardStep1Resource1">
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以生成一个本地资源文件,它会自动添加资源元:
meta:resourcekey="TreeNodeResource2"
这将指向 TreeView 节点Text Property
生成后本地资源,我得到了以下资源文件...
You can generate a Local resource file and it will automatically add the resource meta:
meta:resourcekey="TreeNodeResource2"
this will point to the TreeView NodeText Property
Upon generation of the local resource, I got the following resource file...