开发者

How to set localization for treeview control in asp.net?

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开发者_Go百科  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>


You can generate a Local resource file and it will automatically add the resource meta:

meta:resourcekey="TreeNodeResource2" this will point to the TreeView Node Text Property

  <asp:TreeView meta:resourcekey="TreeViewQ" ID="Q_View" runat="server">
        <Nodes>
            <asp:TreeNode Text="FirstNode" Value="1" meta:resourcekey="TreeNodeResource2">
                <asp:TreeNode Text="child1" Value="2" meta:resourcekey="TreeNodeResource1"></asp:TreeNode>
            </asp:TreeNode>
            <asp:TreeNode Text="Secondnode" Value="3" meta:resourcekey="TreeNodeResource4">
                <asp:TreeNode Text="thirdnode" Value="4" meta:resourcekey="TreeNodeResource3"></asp:TreeNode>
            </asp:TreeNode>
        </Nodes>
    </asp:TreeView>

Upon generation of the local resource, I got the following resource file...

How to set localization for treeview control in asp.net?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜