Click here to Skip to main content
15,887,027 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Promp box in the center of screen Pin
Blue_Boy27-Jul-09 3:52
Blue_Boy27-Jul-09 3:52 
GeneralRe: Promp box in the center of screen Pin
Abhijit Jana27-Jul-09 3:54
professionalAbhijit Jana27-Jul-09 3:54 
GeneralRe: Promp box in the center of screen Pin
Blue_Boy27-Jul-09 3:57
Blue_Boy27-Jul-09 3:57 
GeneralRe: Promp box in the center of screen Pin
Viral Upadhyay27-Jul-09 4:17
Viral Upadhyay27-Jul-09 4:17 
GeneralRe: Promp box in the center of screen Pin
Blue_Boy27-Jul-09 4:19
Blue_Boy27-Jul-09 4:19 
AnswerRe: Promp box in the center of screen Pin
ToddHileHoffer27-Jul-09 7:11
ToddHileHoffer27-Jul-09 7:11 
Questionproblem with ajax control DragDropExtender Pin
S.Aijaz27-Jul-09 2:37
S.Aijaz27-Jul-09 2:37 
QuestionDynamic Treeview - (problem with nodes getting multiplied) Pin
sigurdur einarsson27-Jul-09 2:17
sigurdur einarsson27-Jul-09 2:17 
Hello, Ive got a problem with all new sub nodes in a treeview getting multiplied with every postback

--------------------------- (GOOD) before any node check change ---------------
node1
node2
node3

--------------------------- (GOOD) after checking node 1 ---------------
node1
subnode1:113424
subnode2:113424
subnode3:113424
node2
node3

--------------------------- (BAD) after checking node 2 ---------------
node1
subnode1:113424
subnode2:113424
subnode3:113424
subnode1:113424
subnode2:113424
subnode3:113424
node2
subnode1:113431
subnode2:113431
subnode3:113431
node3

---------------------------(BAD) after checking node 3 ---------------
node1
subnode1:113424
subnode2:113424
subnode3:113424
subnode1:113424
subnode2:113424
subnode3:113424
subnode1:113424
subnode2:113424
subnode3:113424
subnode1:113424
subnode2:113424
subnode3:113424
node2
subnode1:113431
subnode2:113431
subnode3:113431
subnode1:113431
subnode2:113431
subnode3:113431
node3
subnode1:113434
subnode2:113434

------------------- ASP code -----------------------

<body>
<form id="form1" runat="server">
<div>
<asp:PlaceHolder ID="PHForTree" runat=server ></asp:PlaceHolder>
</div>
</form>
</body>


---------------- Code behind --------------

protected void Page_Load(object sender, EventArgs e)
{
TreeView obTreeView = null;
if (IsPostBack == false)
{
obTreeView = new TreeView();

obTreeView.Nodes.Add(new TreeNode("node1"));
obTreeView.Nodes.Add(new TreeNode("node2"));
obTreeView.Nodes.Add(new TreeNode("node3"));
Session["m_obTreeView"] = obTreeView;
}
else
obTreeView = (TreeView)Session["m_obTreeView"];

obTreeView.SelectedNodeChanged += new EventHandler(this.Node_Change);
PHForTree.Controls.Add(obTreeView);
}

void Node_Change(object sender, EventArgs e)
{
TreeView obTreeView = (TreeView)Session["m_obTreeView"];
string strDateTimeStamp = DateTime.Now.ToString("hhmmss");
obTreeView.SelectedNode.ChildNodes.Add(new TreeNode("subnode1:" + strDateTimeStamp));
obTreeView.SelectedNode.ChildNodes.Add(new TreeNode("subnode2:" + strDateTimeStamp));
obTreeView.SelectedNode.ChildNodes.Add(new TreeNode("subnode3:" + strDateTimeStamp));

Session["m_obTreeView"] = obTreeView;
}


I hope someone can help,....

With Regards, Siggi
AnswerRe: Dynamic Treeview - (problem with nodes getting multiplied) Pin
Blue_Boy27-Jul-09 2:35
Blue_Boy27-Jul-09 2:35 
GeneralRe: Dynamic Treeview - (problem with nodes getting multiplied) Pin
sigurdur einarsson27-Jul-09 2:41
sigurdur einarsson27-Jul-09 2:41 
GeneralRe: Dynamic Treeview - (problem with nodes getting multiplied) Pin
Blue_Boy27-Jul-09 3:28
Blue_Boy27-Jul-09 3:28 
GeneralRe: Dynamic Treeview - (problem with nodes getting multiplied) Pin
sigurdur einarsson29-Jul-09 3:07
sigurdur einarsson29-Jul-09 3:07 
GeneralRe: Dynamic Treeview - (problem with nodes getting multiplied) Pin
Blue_Boy29-Jul-09 7:17
Blue_Boy29-Jul-09 7:17 
Questionset the onclick property of html button in javascript Pin
zeeShan anSari27-Jul-09 2:11
zeeShan anSari27-Jul-09 2:11 
AnswerRe: set the onclick property of html button in javascript Pin
Mike Ellison27-Jul-09 2:16
Mike Ellison27-Jul-09 2:16 
GeneralRe: set the onclick property of html button in javascript Pin
zeeShan anSari27-Jul-09 2:23
zeeShan anSari27-Jul-09 2:23 
AnswerRe: set the onclick property of html button in javascript Pin
Blue_Boy27-Jul-09 2:30
Blue_Boy27-Jul-09 2:30 
Questiondynamic chart controls Pin
bikash pattanayak27-Jul-09 2:00
bikash pattanayak27-Jul-09 2:00 
AnswerRe: dynamic chart controls Pin
Mike Ellison27-Jul-09 2:13
Mike Ellison27-Jul-09 2:13 
AnswerRe: dynamic chart controls Pin
Abhijit Jana27-Jul-09 2:18
professionalAbhijit Jana27-Jul-09 2:18 
QuestionLogin Credentials Pin
Suman Gomedhikam27-Jul-09 1:33
Suman Gomedhikam27-Jul-09 1:33 
AnswerRe: Login Credentials Pin
Blue_Boy27-Jul-09 1:36
Blue_Boy27-Jul-09 1:36 
AnswerRe: Login Credentials Pin
Blikkies27-Jul-09 1:43
professionalBlikkies27-Jul-09 1:43 
GeneralRe: Login Credentials Pin
Suman Gomedhikam27-Jul-09 18:28
Suman Gomedhikam27-Jul-09 18:28 
QuestionScroll and highlight the html table's row ? Pin
zeeShan anSari27-Jul-09 1:22
zeeShan anSari27-Jul-09 1:22 

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.