Click here to Skip to main content
15,905,414 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have a Treeview like this...

AA
------BB
------CC
*****------3rd Child Of CC
DD
------EE
------FF

I am using this Tree View as a TOC(Table of content)
My requirement is when we click on any nodes that will redirect to the particular section in that web page(wherever the name is equal to the node name in the html page should go to that places)..

Sir I tried like this...

C#
protected void trvToc_SelectedNodeChanged(object sender, EventArgs e)
{
    try
    {
        string SlelectedText = trvToc.SelectedNode.Text;
        StringBuilder sb=PageContent;///I have complete html page part in this sb

    }
    catch (Exception Ex)
    {

        throw Ex;
    }
}


Now i want to know how to change the location of the curser to the section which is equal to the node name..
Help me pls sir.
Thank you
Posted
Updated 25-Apr-13 2:00am
v15
Comments
Ankur\m/ 25-Apr-13 1:08am    
So you deleted your original question and created a new one. Why don't you do some search on Google and show us what you tried and where you failed instead of waiting here for someone to reply?
kanamala subin 25-Apr-13 1:10am    
I searched many times..bt i cant find a solution..I failed in that..May be my searched key words are not proper..thats why i waiting for anyones reply..give me some idea..or just give me any link which is helful to me..
kanamala subin 25-Apr-13 5:21am    
if any one need any clarification ...pls let me know..bcz I am seriously looking for a solution..
kanamala subin 25-Apr-13 6:10am    
52 views no Answer..??
kanamala subin 25-Apr-13 9:08am    
I think codeprogect cant answer this question..Thank you..Here people are sitting for finding the mistakes from the users.Not for solving their problems...

1 solution

It is explained in the documentation[^].
 
Share this answer
 
Comments
kanamala subin 25-Apr-13 7:43am    
Sir this is explaining the navigate url only...there is nothing explaining to move to the same page based on click..
Richard MacCutchan 25-Apr-13 7:57am    
I'm really not sure what you are trying to do but maybe TreeNode.Select will help.
kanamala subin 25-Apr-13 8:00am    
Sir...like in wikipedia web site, we can see the table of content...
If we click any node that will redirect to the particular section..the same thing i need..
Richard MacCutchan 25-Apr-13 8:35am    
I would suggest you go and research some articles on ASP TreeView controls. You can start at http://www.codeproject.com/KB/webforms.
kanamala subin 25-Apr-13 8:41am    
everyone's time have value..pls dont waste it..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900