Click here to Skip to main content
15,915,791 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Using API for XML Request Pin
enjoycrack23-May-07 23:34
enjoycrack23-May-07 23:34 
Questioncreating Context menu Pin
Rajiya23-May-07 20:44
Rajiya23-May-07 20:44 
AnswerRe: creating Context menu Pin
enjoycrack23-May-07 21:43
enjoycrack23-May-07 21:43 
GeneralRe: creating Context menu Pin
Rajiya24-May-07 0:50
Rajiya24-May-07 0:50 
GeneralRe: creating Context menu Pin
enjoycrack24-May-07 0:55
enjoycrack24-May-07 0:55 
GeneralRe: creating Context menu Pin
Rajiya24-May-07 1:39
Rajiya24-May-07 1:39 
GeneralRe: creating Context menu Pin
Rajiya24-May-07 1:42
Rajiya24-May-07 1:42 
Questioncalculate level of a node of tree not having more than two nodes under him Pin
singhal's23-May-07 20:38
singhal's23-May-07 20:38 
Smile | :) hi all,
i am a new guy..
i get good results from Recursive queries in sql server 2005 to count no of childs unde a node in a tree.

but now i am facing a problem ???

i have to define the level of a node ..

the case is as : starting from the rootnode of tree every node can have maximum of two node as left node and right node. not more than two node under a node.
so at level zero means root of node contains zero nodes.
suppose A is root of tree. first ledt node of A will be create afetr that right node a will be create. now A have two members under him so A is now at level one.
as suppose A have two node B(left)/C(right). and node B contais D/E as left right node and C(right of A ) contains F/G as Left/right node than at this level B exactly contains two nodes under him as well as C conyais two nodes . so binary has been complete. so now A is at level two.
now D has left only and G has only left node so at this level D E F G are uncomplete (having less tahn two nodes ) so now a is at two level.
so this is the pattern for that structure..
so have to et the level for every node in the tree.
now can i do
i am using asp . net 1.1/C# and sql server 2005.
This is the table structure for above :---
-------------------------------------------
Id name ParentId Left Right
--------------------------------------------
1 A -1/null 0 1
------------------------------------------
2 B 1 0 1
-------------------------------------------
3 C 1 0 1
--------------------------------------------
4 D 2 0 -1
----------------------------------------------
5 E 2 -1 -1
----------------------------------------------
6 F 3 -1 -1
-----------------------------------------------
7 G 3 0 -1
------------------------------------------------
8 H 4 -1 -1
--------------------------------------------
9 I 7 -1 -1
-----------------------------------------------
parent of A has null or -1 as reference .if a node has keft child that is represent by zero and for right one .
if a node does not contains any node this left=right will be -1;

so plz help me how can i set the level of a node in the tree.
the depth can be up to 50,000 node.


jh hsg sabdhas avdhagd advahgd axva

Questionuploading ASP.NET Project ? Pin
moomoooomoo23-May-07 20:16
moomoooomoo23-May-07 20:16 
AnswerRe: uploading ASP.NET Project ? Pin
enjoycrack23-May-07 21:26
enjoycrack23-May-07 21:26 
AnswerRe: uploading ASP.NET Project ? Pin
metallica_rock1023-May-07 23:14
metallica_rock1023-May-07 23:14 
QuestionRich Text Editor in ASP.NET2.0 Pin
varshavmane23-May-07 20:11
varshavmane23-May-07 20:11 
AnswerRe: Rich Text Editor in ASP.NET2.0 Pin
enjoycrack23-May-07 21:33
enjoycrack23-May-07 21:33 
AnswerRe: Rich Text Editor in ASP.NET2.0 Pin
Sandeep Akhare23-May-07 22:03
Sandeep Akhare23-May-07 22:03 
GeneralRe: Rich Text Editor in ASP.NET2.0 Pin
varshavmane23-May-07 22:18
varshavmane23-May-07 22:18 
GeneralRe: Rich Text Editor in ASP.NET2.0 Pin
Sandeep Akhare23-May-07 22:22
Sandeep Akhare23-May-07 22:22 
QuestionHighlight gridview row using AJAX Pin
playout23-May-07 19:56
playout23-May-07 19:56 
AnswerRe: Highlight gridview row using AJAX Pin
Sherin Iranimose23-May-07 20:45
Sherin Iranimose23-May-07 20:45 
QuestionHML request Pin
praveenkumar_mca23-May-07 19:25
praveenkumar_mca23-May-07 19:25 
JokeRe: HML request Pin
Sandeep Akhare23-May-07 20:52
Sandeep Akhare23-May-07 20:52 
QuestionRe: HML request Pin
praveenkumar_mca23-May-07 20:57
praveenkumar_mca23-May-07 20:57 
GeneralRe: HML request Pin
praveenkumar_mca23-May-07 21:16
praveenkumar_mca23-May-07 21:16 
AnswerRe: HML request Pin
Steven J Jowett23-May-07 23:20
Steven J Jowett23-May-07 23:20 
GeneralRe: HML request Pin
praveenkumar_mca24-May-07 0:29
praveenkumar_mca24-May-07 0:29 
GeneralRe: HML request Pin
Steven J Jowett24-May-07 1:25
Steven J Jowett24-May-07 1:25 

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.