HighTechTalks DotNet Forums  

Retrieving tooltiptext values from an xml file

Dotnet XML microsoft.public.dotnet.xml


Discuss Retrieving tooltiptext values from an xml file in the Dotnet XML forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Ram
 
Posts: n/a

Default Retrieving tooltiptext values from an xml file - 06-19-2006 , 01:20 AM






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


Reply With Quote
  #2  
Old   
Dhanvanth
 
Posts: n/a

Default Re: Retrieving tooltiptext values from an xml file - 06-20-2006 , 01:03 PM






Ram wrote:
Quote:
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
You can set the ID of each control and map those to the tooltips in
your xml file.

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



foreach(WebControl c in Page.Controls)
{
c.ToolTip=tooltipXmlDoc.SelectSingleNode("/tooltips/tooltip[@elementID='"+c.ID+"']").InnerText;
}

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

-Dhanvanth



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.