<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Internet Explorer Web Controls</title><link>http://forums.asp.net/91.aspx</link><description>General discussion of the Internet Explorer Web Controls source package for ASP.NET 1.x.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: TreeView OnSelectedIndexChange Client Side Event Question</title><link>http://forums.asp.net/thread/351895.aspx</link><pubDate>Mon, 29 Sep 2003 22:55:14 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:351895</guid><dc:creator>seljo</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/351895.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=91&amp;PostID=351895</wfw:commentRss><description>I am having trouble capturing any client side events for this control.  Could you post the entire .aspx HTML source for me to compare to mine?  I am trying to add nodes dynamically from a DB.   I can do this by setting AutoPostback to true, but everytime a click event occurs, the page gets posted back.  This is unacceptable!  I need to be able to determine in client side script when the page posts back.  Any ideas would be greatly appreciated.  Here is my aspx HTML code:
&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;
&amp;lt;%@ Page Language=&amp;quot;vb&amp;quot; AutoEventWireup=&amp;quot;false&amp;quot; Codebehind=&amp;quot;treeview.aspx.vb&amp;quot; Inherits=&amp;quot;ilh.WebForm1&amp;quot;%&amp;gt;
&lt;br /&gt;
&amp;lt;%@ Register TagPrefix=&amp;quot;ie&amp;quot; Namespace=&amp;quot;Microsoft.Web.UI.WebControls&amp;quot; Assembly=&amp;quot;Microsoft.Web.UI.WebControls&amp;quot; %&amp;gt;
&lt;br /&gt;
&amp;lt;%@ import namespace=&amp;quot;Microsoft.Web.UI.WebControls&amp;quot;%&amp;gt;
&lt;br /&gt;
&amp;lt;!DOCTYPE HTML PUBLIC &amp;quot;-//W3C//DTD HTML 4.0 Transitional//EN&amp;quot;&amp;gt;
&lt;br /&gt;
&amp;lt;HTML&amp;gt;
&lt;br /&gt;
	&amp;lt;HEAD&amp;gt;
&lt;br /&gt;
		&amp;lt;title&amp;gt;ILH Browser&amp;lt;/title&amp;gt;
&lt;br /&gt;
	&amp;lt;script language=&amp;quot;javascript&amp;quot;&amp;gt;
&lt;br /&gt;
	&amp;lt;!--
&lt;br /&gt;
		function js_indexChanged()
&lt;br /&gt;
		{
&lt;br /&gt;
			document.write(&amp;quot;hello&amp;quot;);
&lt;br /&gt;
		}
&lt;br /&gt;
		--&amp;gt;
&lt;br /&gt;
	&amp;lt;/script&amp;gt;
&lt;br /&gt;
		
&lt;br /&gt;
	&amp;lt;meta content=&amp;quot;Microsoft Visual Studio .NET 7.1&amp;quot; name=&amp;quot;GENERATOR&amp;quot;&amp;gt;
&lt;br /&gt;
		&amp;lt;meta content=&amp;quot;Visual Basic .NET 7.1&amp;quot; name=&amp;quot;CODE_LANGUAGE&amp;quot;&amp;gt;
&lt;br /&gt;
		&amp;lt;meta content=&amp;quot;JavaScript&amp;quot; name=&amp;quot;vs_defaultClientScript&amp;quot;&amp;gt;
&lt;br /&gt;
		&amp;lt;meta content=&amp;quot;http://schemas.microsoft.com/intellisense/ie5&amp;quot; name=&amp;quot;vs_targetSchema&amp;quot;&amp;gt;
&lt;br /&gt;
	&amp;lt;/HEAD&amp;gt;
&lt;br /&gt;
	&amp;lt;body MS_POSITIONING=&amp;quot;GridLayout&amp;quot;&amp;gt;
&lt;br /&gt;
		&amp;lt;form id=&amp;quot;Form1&amp;quot; method=&amp;quot;post&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
&lt;br /&gt;

&lt;br /&gt;
			&amp;lt;asp:button id=&amp;quot;Button1&amp;quot; style=&amp;quot;Z-INDEX: 101; LEFT: 24px; POSITION: absolute; TOP: 64px&amp;quot; runat=&amp;quot;server&amp;quot;
&lt;br /&gt;
				Text=&amp;quot;Refresh&amp;quot; Width=&amp;quot;65px&amp;quot; Height=&amp;quot;24px&amp;quot;&amp;gt;&amp;lt;/asp:button&amp;gt;
&lt;br /&gt;

&lt;br /&gt;
			&amp;lt;ie:treeview id=&amp;quot;Treeview1&amp;quot; style=&amp;quot;Z-INDEX: 102; LEFT: 24px; POSITION: absolute; TOP: 104px&amp;quot;
&lt;br /&gt;
				runat=&amp;quot;server&amp;quot; Expanded=&amp;quot;false&amp;quot; Autopostback=&amp;quot;false&amp;quot; NAME=&amp;quot;Treeview1&amp;quot;&amp;gt;&amp;lt;/ie:treeview&amp;gt;
&lt;br /&gt;

&lt;br /&gt;
			&amp;lt;asp:label id=&amp;quot;lblNodeCount&amp;quot; style=&amp;quot;Z-INDEX: 103; LEFT: 104px; POSITION: absolute; TOP: 64px&amp;quot;
&lt;br /&gt;
				runat=&amp;quot;server&amp;quot; Width=&amp;quot;320px&amp;quot; Height=&amp;quot;16px&amp;quot;&amp;gt;Number of nodes&amp;lt;/asp:label&amp;gt;
&lt;br /&gt;
			
&lt;br /&gt;
		&amp;lt;/form&amp;gt;
&lt;br /&gt;
	&amp;lt;/body&amp;gt;
&lt;br /&gt;
&amp;lt;/HTML&amp;gt;
&lt;br /&gt;

&lt;br /&gt;
my vb code:
&lt;br /&gt;

&lt;br /&gt;
...
&lt;br /&gt;

&lt;br /&gt;
sub page_load()
&lt;br /&gt;
...
&lt;br /&gt;
treeview1.atributes.add(&amp;quot;onselectedindexchange&amp;quot;,&amp;quot;js_indexChanged();&amp;quot;)
&lt;br /&gt;
...
&lt;br /&gt;
end sub</description></item><item><title>Re: TreeView OnSelectedIndexChange Client Side Event Question</title><link>http://forums.asp.net/thread/225402.aspx</link><pubDate>Wed, 21 May 2003 18:16:41 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:225402</guid><dc:creator>luvnsv</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/225402.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=91&amp;PostID=225402</wfw:commentRss><description>i also have the same problem getting the text that i clicked on the tree
&lt;br /&gt;
any idea on how to do?
&lt;br /&gt;
i'm using vb, can help out?
&lt;br /&gt;

&lt;br /&gt;
thanks...</description></item><item><title>Re: TreeView OnSelectedIndexChange Client Side Event Question</title><link>http://forums.asp.net/thread/224868.aspx</link><pubDate>Wed, 21 May 2003 10:04:01 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:224868</guid><dc:creator>majstor</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/224868.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=91&amp;PostID=224868</wfw:commentRss><description>It helps and works fine with IE 6.0 but on IE 5.0 window.event.newTreeNodeIndex is undefined and on line 
&lt;br /&gt;
newIndex= window.event.newTreeNodeIndex;
&lt;br /&gt;
 reports an error: &amp;quot;object doesn't support property or method&amp;quot;
&lt;br /&gt;

&lt;br /&gt;
Any idea?</description></item><item><title>Re: TreeView OnSelectedIndexChange Client Side Event Question</title><link>http://forums.asp.net/thread/211188.aspx</link><pubDate>Mon, 05 May 2003 15:26:50 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:211188</guid><dc:creator>MLibby</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/211188.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=91&amp;PostID=211188</wfw:commentRss><description>Here's the scoop...
&lt;br /&gt;
Unlike the HTML server controls, for the Web server controls, you cannot simply use the HTML sytax to add cliend-side event handling.  The reason is ASP.NET already uses client-side event handling code to perform automatic postback operations.  So for Web controls you have to use Attributes.Add(...) to handle the client side click.  Here are code snippets...
&lt;br /&gt;

&lt;br /&gt;
&amp;lt;HTML&amp;gt;
&lt;br /&gt;
   &amp;lt;HEAD&amp;gt;
&lt;br /&gt;
      &amp;lt;title&amp;gt;Main&amp;lt;/title&amp;gt;
&lt;br /&gt;
...
&lt;br /&gt;
&amp;lt;script language=&amp;quot;javascript&amp;quot;&amp;gt;
&lt;br /&gt;
&amp;lt;!--
&lt;br /&gt;
function myFunction()
&lt;br /&gt;
{
&lt;br /&gt;
	var newIndex= window.event.newTreeNodeIndex;
&lt;br /&gt;
	var Node = MyTree.getTreeNode(newIndex); 
&lt;br /&gt;
	var NodeName = Node.getAttribute(&amp;quot;text&amp;quot;);
&lt;br /&gt;
             // I'm using an html text box here because I don't
&lt;br /&gt;
             // know how to set the web form text box in a client 
&lt;br /&gt;
             // java script.  Any help would be appreciated.
&lt;br /&gt;
	document.Main.htbSelected.value = NodeName; 
&lt;br /&gt;
}
&lt;br /&gt;
//--&amp;gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;
&lt;br /&gt;
&amp;lt;/HEAD&amp;gt;
&lt;br /&gt;
...
&lt;br /&gt;

&lt;br /&gt;
C# code:
&lt;br /&gt;
private void Page_Load(object sender, System.EventArgs e)
&lt;br /&gt;
{
&lt;br /&gt;
	if (!IsPostBack)
&lt;br /&gt;
	{
&lt;br /&gt;
                         // I'm using one of many ways to populate the tree, an xml file.
&lt;br /&gt;
		MyTree.TreeNodeSrcFile = MapPath(&amp;quot;EmpReportsTo.tns.xml&amp;quot;);
&lt;br /&gt;
		MyTree.Attributes.Add(&amp;quot;onselectedindexchange&amp;quot;, &amp;quot;myFunction();&amp;quot;);
&lt;br /&gt;
		DataBind();
&lt;br /&gt;
	}
&lt;br /&gt;
}
&lt;br /&gt;
...
&lt;br /&gt;

&lt;br /&gt;
That should be all you need.  Let me know if this helps,
&lt;br /&gt;
Mike
&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;</description></item><item><title>Re: TreeView OnSelectedIndexChange Client Side Event Question</title><link>http://forums.asp.net/thread/210771.aspx</link><pubDate>Mon, 05 May 2003 01:16:34 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:210771</guid><dc:creator>molingw</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/210771.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=91&amp;PostID=210771</wfw:commentRss><description>hello! i met the same question. i do not how to get the Event when i click the node. because i want to display then node's text which i click. 
&lt;br /&gt;

&lt;br /&gt;
thank you!
&lt;br /&gt;

&lt;br /&gt;</description></item><item><title>Re: TreeView OnSelectedIndexChange Client Side Event Question</title><link>http://forums.asp.net/thread/199732.aspx</link><pubDate>Mon, 21 Apr 2003 15:25:22 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:199732</guid><dc:creator>kevin_jones</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/199732.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=91&amp;PostID=199732</wfw:commentRss><description>var Node = MyTree.getTreeNode(Index);
&lt;br /&gt;
var NodeType = FromNode.getAttribute(&amp;quot;type&amp;quot;);
&lt;br /&gt;
var NodeName = FromNode.getAttribute(&amp;quot;text&amp;quot;);
&lt;br /&gt;
window.status = &amp;quot;The type is &amp;quot; + Type + &amp;quot; and the name is &amp;quot; + Name + &amp;quot;.&amp;quot;;
&lt;br /&gt;</description></item><item><title>TreeView OnSelectedIndexChange Client Side Event Question</title><link>http://forums.asp.net/thread/197977.aspx</link><pubDate>Thu, 17 Apr 2003 20:31:06 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:197977</guid><dc:creator>MLibby</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/197977.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=91&amp;PostID=197977</wfw:commentRss><description>Hello everyone, 
&lt;br /&gt;

&lt;br /&gt;
I'm able to successfully handle the OnSelectedIndexChange client side event but now how do I get to the text and data of the selected item using the index?
&lt;br /&gt;

&lt;br /&gt;
Here is my code:
&lt;br /&gt;

&lt;br /&gt;
WebForm1.aspx.cs
&lt;br /&gt;
...
&lt;br /&gt;
TreeXmlSql.Attributes.Add(&amp;quot;onselectedindexchange&amp;quot;, &amp;quot;myFunction();&amp;quot;);
&lt;br /&gt;
...
&lt;br /&gt;

&lt;br /&gt;
WebForm1.aspx
&lt;br /&gt;
...
&lt;br /&gt;
&amp;lt;!--
&lt;br /&gt;
function myFunction()
&lt;br /&gt;
{
&lt;br /&gt;
   var oldIndex= window.event.oldTreeNodeIndex;
&lt;br /&gt;
   var newIndex= window.event.newTreeNodeIndex;
&lt;br /&gt;
   alert(&amp;quot;The value of the oldTreeNodeIndex property is  &amp;quot; + oldIndex + 
&lt;br /&gt;
      &amp;quot;\nThe value of the newTreeNodeIndex property is  &amp;quot; + newIndex);
&lt;br /&gt;
}
&lt;br /&gt;
//--&amp;gt;
&lt;br /&gt;
...
&lt;br /&gt;

&lt;br /&gt;
Any help is greatly appeciated,
&lt;br /&gt;
Mike</description></item></channel></rss>