Hi Amanda,
Thanks for your suggestion. I tried these steps but I am having a few issues.
I register the script using Page.RegisterStartupScript. But how can I invoke that function? I have to first make sure that the new node is inserted into the db table, which I do on a button click event. Then I pull the nodes once again from the db so that I can select the newly added node. If I add an attribute to onclick of the button, am I guaranteed that first the button click event occurs (and server side code executes) and then finally, the javascript function is invoked?.
I meant to say, how can I ensure that the javascript function is invoked last?
Also for some reason, I don't see the script in the page source. I have user controls on the page and the treeview is in one user control and adding a node functionality is in another user control.
Can you please get back to me?
Thanks a lot!!