Retrieving tooltiptext values from an xml file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ram

    #1

    Retrieving tooltiptext values from an xml file

    Hi All,

    I am working with an asp.net application. My client wants the
    tooltiptext for the controls to be displayed from an xml file. Creating
    an Xml file is not a problem.

    How can I proceed further to retrieve the values from the Xml file
    and assign them to the tooltiptext property of the web controls ?

    Please give me a solution to accomplish this task with minimum code.

    Thanks in advance.

    Regards,
    S.Ramalingam

  • Dhanvanth

    #2
    Re: Retrieving tooltiptext values from an xml file

    Ram wrote:[color=blue]
    > Hi All,
    >
    > I am working with an asp.net application. My client wants the
    > tooltiptext for the controls to be displayed from an xml file. Creating
    > an Xml file is not a problem.
    >
    > How can I proceed further to retrieve the values from the Xml file
    > and assign them to the tooltiptext property of the web controls ?
    >
    > Please give me a solution to accomplish this task with minimum code.
    >
    > Thanks in advance.
    >
    > Regards,
    > S.Ramalingam[/color]

    You can set the ID of each control and map those to the tooltips in
    your xml file.

    eg:
    <tooltips>
    <tooltip elementID="Butt on1">Tooltip for button one</tooltip>
    ....
    ....
    </tooltips>



    foreach(WebCont rol c in Page.Controls)
    {
    c.ToolTip=toolt ipXmlDoc.Select SingleNode("/tooltips/tooltip[@elementID='"+c .ID+"']").InnerTex t;
    }

    Note: The Page.Controls will only return the child controls of the
    page.

    -Dhanvanth

    Comment

    Working...