Click here to Skip to main content
16,006,348 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionAssigning a BackColor in code Pin
AlterD15-Aug-07 1:36
AlterD15-Aug-07 1:36 
AnswerRe: Assigning a BackColor in code Pin
Guffa15-Aug-07 3:46
Guffa15-Aug-07 3:46 
GeneralRe: Assigning a BackColor in code Pin
AlterD15-Aug-07 7:26
AlterD15-Aug-07 7:26 
QuestionInserting a property value into the meta tag Pin
JacquesDP15-Aug-07 0:12
JacquesDP15-Aug-07 0:12 
AnswerRe: Inserting a property value into the meta tag Pin
SHatchard15-Aug-07 0:38
SHatchard15-Aug-07 0:38 
GeneralRe: Inserting a property value into the meta tag Pin
JacquesDP16-Aug-07 0:03
JacquesDP16-Aug-07 0:03 
AnswerRe: Inserting a property value into the meta tag Pin
ridda78615-Aug-07 23:59
ridda78615-Aug-07 23:59 
QuestionProblem with TreeView selected node! Pin
kokain14-Aug-07 23:20
kokain14-Aug-07 23:20 
Hi there,

I've got a TreeView like below
1
1.1
1.2
1.2.1
1.2.2
1.2.3
1.3
2

The code in SelectedIndexChange event like below

TreeNode currentNode = TreeView1.SelectedNode;<br />
        TreeNode parentNode = currentNode.Parent;<br />
<br />
        currentNode.Select();<br />
        <br />
        if (parentNode != null)<br />
        {<br />
            Response.Write(parentNode.ChildNodes.IndexOf(currentNode));<br />
        }<br />
        else<br />
            Response.Write(TreeView1.Nodes.IndexOf(currentNode));


If I clicked 1.2.1 or 1.2.2. or 1.2.3, the page would say the index of the node I've cliked right.
If I clicked 1 or 1.1 or 1.2 or 1.3 or 2, the page would say the index of the node I've clicked is 0. WTF | :WTF:

I don't know why, the index of 2 should be 1, index of 1.3 should be 2, ... but it wasn't correctly.


Anyone help me solve this issue.


Thanks.
Question"Page cannot be displayed" message Pin
greekius14-Aug-07 22:49
greekius14-Aug-07 22:49 
AnswerRe: "Page cannot be displayed" message Pin
kubben15-Aug-07 1:40
kubben15-Aug-07 1:40 
GeneralSOLUTION OF Re: "Page cannot be displayed" message Pin
greekius15-Aug-07 2:21
greekius15-Aug-07 2:21 
QuestionDataTable Pin
ejaz_pk14-Aug-07 22:20
ejaz_pk14-Aug-07 22:20 
AnswerRe: DataTable Pin
Christian Graus15-Aug-07 0:33
protectorChristian Graus15-Aug-07 0:33 
QuestionApplication_End or Session_End Pin
OlaMohammed14-Aug-07 22:20
OlaMohammed14-Aug-07 22:20 
AnswerRe: Application_End or Session_End Pin
John-ph14-Aug-07 23:07
John-ph14-Aug-07 23:07 
Questiondeleting a product in ASP Pin
surfer.chic.robbie14-Aug-07 21:56
surfer.chic.robbie14-Aug-07 21:56 
AnswerRe: deleting a product in ASP Pin
Fred_Smith14-Aug-07 22:12
Fred_Smith14-Aug-07 22:12 
AnswerRe: deleting a product in ASP Pin
Christian Graus15-Aug-07 0:34
protectorChristian Graus15-Aug-07 0:34 
AnswerRe: deleting a product in ASP Pin
Paddy Boyd15-Aug-07 0:41
Paddy Boyd15-Aug-07 0:41 
QuestionProblem in handling SelectedIndexChanged event of a dynamically created drop down Pin
ridda78614-Aug-07 21:49
ridda78614-Aug-07 21:49 
AnswerRe: Problem in handling SelectedIndexChanged event of a dynamically created drop down Pin
Christian Graus15-Aug-07 0:36
protectorChristian Graus15-Aug-07 0:36 
QuestionCache problem Pin
devboycpp14-Aug-07 21:18
devboycpp14-Aug-07 21:18 
AnswerRe: Cache problem Pin
Amit Kumar G15-Aug-07 0:15
Amit Kumar G15-Aug-07 0:15 
AnswerRe: Cache problem Pin
kubben15-Aug-07 1:42
kubben15-Aug-07 1:42 
GeneralRe: Cache problem Pin
devboycpp15-Aug-07 2:50
devboycpp15-Aug-07 2:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.