Wednesday, March 28, 2012

ajax Calendar

how do i reduce the ajax Calendar height and width?

thanks.

Hi,

have a loot at the following post ,
http://forums.asp.net/1605173/ShowThread.aspx

please also see the blog, to understand the styles of calendar extender control

http://community.bennettadelson.com/blogs/rbuckton/archive/2007/02/02/Skinning-model-for-Calendar-and-Tabs-in-Ajax-Control-Toolkit.aspx

cheers

Ajax CaledarExtender

Hi,

I have a problem with CalendarExtender, the calendar is not set under the textbox, its position depends on the position of the scroll. How can I force the calendar to appear always under the textbox?

Thanks.

Your problem may be related to other CSS styles that you have on the page that may be effecting the calendar. Also, make sure IE6 is rendering in standards mode vs. quirks mode (seehttp://en.wikipedia.org/wiki/Quirks_mode for more info on Quirks Mode) since the AJAX Control Toolkit assumes IE is rendering pages in standards mode.

-Damien


Thanks, but I placed Calendar above everything, where it couldn't be affected by any CSS style and it was the same. I am using IE7 and it's not working either.

Monika


IE7 can also be pushed in quirks mode, could this be happening? Are you using absolute positioning or something that may be causing the issue?

I think there still may be some style causing you problems, try looking at the applied styles using the IE Developer Toolbar or Firebug for Firefox, both are free.

-Damien


I actually filed a bug against something virtually identical to this at CodePlex and then created and documented all the code that would fix it. Both the PopupExtender which it relies on, and the CalendarExtender need patches. The problem arises because the PopupExtender tries to calculate the position where it should appear based on scroll positions and page size. That's fine for the PopupExtender, but not for the CalendarExtender. The fix was to add a property to PopupExtender that would cause this calculation to be bypassed and then specify true for this default false property in the CalendarExtender. The CodePlex ID is 9099 and it may fix 8970 as well.

In my case I created a new custom Ajax ToolKit control by copying all the code and modifying the namespace so that it could not conflict with or get overwritten by a future update that did not have a fix. All my code is in 9099 if you do this. If this is not the cause then it is another calculation that I missed, and you would need to modify the JavaScript source in the toolkit.

As a general fix to this problem, the proper fix is probably to add an attribute to the CalendarExtender that would turn this on if you needed it, but would not break previous projects when not specified.


I have the same issue. I tried to look into issues 9099 and 8970 in CodePlex but the system could not find them.

Are these the correct issue IDs or is it just my user account lacking sufficient privileges?


Not sure how you're looking for issues but if you go to the Ajax Toolkit project, click on Issue Tracker and go to the Advanced View, there is a "Go to Isssue #" on the right

AJAX Calander Behind other Controls

Hi All,

I am using the Ajax Calander Control, I have it working in all and I have it writing to a textbox. I have this placed on a form where there are dropdown lists. It seems that the Cal. control always appears behind these dropdownlists instead of infront, therefore making it not visible.

Any work arounds?
Thanks in advance!!!
Tim

Hi tbraga,

I do not notice this behavior and I use VS.NET 2005 sp1 / Ajax Extentions 1 / AjaxControlToolkit 10920.

Can you post code that replicates this behavior?

Kind regards,
wim


Hi Tbraga,

As far as I know, this is a common issue. We suggest that you should upgrade your AJAX Control Toolkit to the latest version. If this doesn't work, you can set its zIndex properties. For example, $find("CalendarExtender's BehaviorID")._popupDiv.zIndex = large enough number.

function pageLoad(){
$find("CalendarExtender's BehaviorID").add_shown(resetZIndex);
}

function resetZIndex(){

$find("CalendarExtender's BehaviorID")._popupDiv.zIndex = value.

}

I hope this help.

Best regards,

Jonathan

AJAX Bug?

I have a page with an upper UpdatePanel that has 3 collapsible panel's and a lower UpdatePanel that has 2 gridviews in it. What happens is you select a list of employees and different training items in the upper UpdatePanel and a cross-tab grid is displayed in the lower UpdatePanel. Once the data is loaded into the cross-tab, it goes through every cell to update the text data to a graphical view of the data. So instead of 0 you would see a blank checkbox, and instead of 2 you would see a checked checkbox. The gridview columns are created dynamically based on what training selections were made. There can be as many as 400 training items at once and a couple hundred employees as well, so you can imagine how big the cross-tab grid can become if everything is selected. This page worked GREAT before I implemented ajax on it(I have my reasons), but now with AJAX in the page the cross-tab will only show if only a small number of employees or trainig items are selected. If you try to select every training item and every employee the whole program crashes in a very nasty way. Imagine losing the whole IE menu bars and start button, quickstart buttons, etc. The WHOLE screen becomes a jumbled mess. Any suggestions? Is this a bug or am I just trying to access too much data through AJAX?

JavaScript just flat out sucks with large amounts of data when looping.

You are probably causing JavaScript to have to loop through 1000's of form elements to figure out what is selected and build a string of that data to be posted. The freezing is the browser eating your CPU trying to crunch all of that data.

Eric


Thanks for the reply. I am starting to understand that this is the reason. Can you think of any workarounds? The only reason AJAX is being used on the page is to get the browser back button to work correctly so that the user can't click back and have someone's employee trained status revert to the previous state. Is there another way around this? Thanks.
hi.
i'm not sure if you're using updatepanels or are you wroking directly with javascript?
Here is a good post on JavaScript performance recommendations:http://blogs.msdn.com/ie/archive/2006/08/28/728654.aspx
Using Ajax
using Ajax.net with Update Panels.

ajax bridge

Initially, I would like to access the web services (cross-domain) in the client side only.

I watched the sample here and try to run the code. but it fails using RC
http://www.asp.net/learn/videos/view.aspx?tabid=63&id=66
error code: cant found "Samples"

I would like to ask if anyone runs the code succesfully in RC?

will there be any similar method that could archiveit and when will it be release?

thx a lot

Try to take a look at the following instructions when calling web service through javascript in the client side.
Now that we've talked about setting up the ScriptManager and how the proxy functionality works, let's take a look at how developers will leverage this technology. We'll look at passing both simple and complex data type and handling errors. During the demos, we'll take a look at the network traffic being passed to and from the server.
?
"Fire and Forget" Invocation?

If the web service class on the server includes a web method that does not return data, you can call the web service without having to handle a response. This is the simplest web method call that can be made from the client. For example, your application has the following web method:
?
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[Microsoft.Web.Script.Services.ScriptService]
public class Parts : System.Web.Services.WebService
{
[WebMethod]
public void NoReturn()
{
//do work here
System.Threading.Thread.Sleep(2000);
}
}
?
The following JavaScript can be used to invoke that web method
?
function RunWebService()
{
Parts.NoReturn();
}
?
If the webservice is in a custom namespace, you would need to fully
qualify the call to the webservice. For example, if the WebService
has a namespace of MyCustomNameSpace.WebServices, the above JavaScript
becomes:
?
function RunWebService()
{
MyCustomNameSpace.WebServices.Parts.NoReturn();
}
?
Getting a return value?
In a scenario where the web method has a return value, then the asynchronous invocation model requires providing a callback function that will be called when the web service call returns. The callback function has an input parameter that contains the results of the web service call.
?
The server-side AJAX stack will appropriately serialize the return value from the web method, and the client-side AJAX stack will deserialize the data to an appropriate JavaScript type to be passed to the callback function.
?
On the Server-side, there is a WebMethod that returns a string:
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[Microsoft.Web.Script.Services.ScriptService]
public class Parts : System.Web.Services.WebService
{
[WebMethod]
public string DynamicDropdown()
{
string tmpDropDown;
tmpDropDown = "<select id=test name=test><option value=Part1>Part1</option><option value=Part2>Part2</option></select>";
return tmpDropDown;
}
}
?
When you call the web service in client script, the call will need to have a callback function specified to handle the return value. The following script demonstrates calling the DynamicDropdown WebMethod of the Parts Web Service and specifies OnComplete as the callback function. The OnComplete function has an input paramter which is the return object from the web service call, in this case, this will be the string value. The OnComplete function then takes the return value and inserts it as the innerHTML property of a span with ID DynamicArea. The result is that a dropdown appears on the page.
function InsertDropdown()
{
Parts.DynamicDropdown(OnComplete);
return false;
}
function OnComplete(result)
{
DynamicArea.innerHTML += result;
}
Passing primitive type parameters to web method
If the web method takes input parameters, then the JavaScript invocation of the method will take corresponding JavaScript parameters. The parameter values will be serialized by the AJAX stack into JSON and packaged in the body of the request and then de-serialized as .Net types corresponding to the signature of the web method.
?
For example, given the following server method that accepts a string parameter and returns a string:
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[Microsoft.Web.Script.Services.ScriptService]
public class Parts : System.Web.Services.WebService
{
[WebMethod]
public string EchoString(String s)
{
return s;
}
}
?
You would use the following JavaScript to call the web service, pass the string parameter and include the callback function:
?
function CallEchoString()
{
Parts.EchoString(form1.GetString.value, OnCallBack);
}
function OnCallBack(results)
{
alert(results);
}
?
The call to the EchoString web method on the Parts.asmx web service is taking the value from a textbox named GetString in a form with ID of "form1" to pass as the input parameter and specifying OnCallBack as the callback function. The OnCallBack function has an input parameter of "results" which is the return type from the EchoString web method. The JavaScript then displays that in a popup box.
Specifying a callback for failure cases?
If the request to the web method is unsuccessful, whether because of error, timeout, or if server code aborts the request, then the callback specified for successful completion will not be called. A second callback function can be specified in the call to the web service for failure cases, receiving an error object as parameter, as in the following javascript:
?
function CallService()
{
PeopleServices.ThrowError(OnCallBackThrowError, OnError);
}
function OnCallBackThrowError(result)
{
alert("OnCallbackThrowError: " + result);
}
function OnError(result)
{
alert("OnError: " + result.get_message());
alert(result.get_stackTrace());
}
?
In the code sample, the ThrowError method of the PeopleServices web service does not take any input parameters. The method call passes the callback function "OnCallBackThrowError" and a method for handling any error condition called "OnError". The OnError method takes an input parameter which is a error object that contains the error message and stack information passed from the server if a .NET Exception was thrown. In this case, the information is displayed in popup windows, but once you have the errors in the browser, you can notify the user in any manner you feel is appropriate.
Using the same callback from multiple callers?
You can leverage the same callback function on the client for multiple web service calls. This allows you to avoid having to write a client function for each callback. In order to differentiate the calls, you pass a user context object that contains information that can be used to tell the requests apart. The user context object can be any JavaScript primitive type, array, or object.
?
For example, let's say you have a web service that contains a web method that you need to call multiple times from the client. You need to know which response corresponds to each call. For example, the first call's return value is placed in Span1 and the second call is in Span2. In order to do this, you can associate context information with the request and you can use the context information to distinguish which request is providing the response. This information is not passed to the server by default. If you want to pass this information to the web service, you would need to pass it as an input parameter to the remote method.
?
On the server, you have the following web service method that is taking in the a string which should be a stock symbol and returning a string:
?
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[Microsoft.Web.Script.Services.ScriptService]
public class Parts : System.Web.Services.WebService
{
[WebMethod]
public string UserContextSample(string stockSymbol)
{
string returnValue = String.Empty;
//do work here to look up stock symbol info
return returnValue;
}
}
?
On the client, you create a JavaScript object to store context specific information and pass that as the last parameter to the web service call. In the sample below, we're creating a dictionary object on the client with a key of contextKey and a value of a stock quote. The syntax for the web service call is:
?
WebService.Method(InputParams, CallBackMethod, ErrorMethod, contextInfo);
?
function CallServicesTest()
{
var userContext1 = {contextKey:"MSFT"};
Parts.UserContextSample("MSFT", OnCallBack, OnError, userContext1);
var userContext2 = {contextKey:"AAPL"};
Parts.UserContextSample("AAPL", OnCallBack, OnError, userContext2);
}
In the callback function, you add a second input parameter that contains the context passed in the web service call. This way you get the results of the web service call in the first input parameter and the context information in the second parameter. In this case, we're checking the context information and inserting text into specific spans on the page along with the response from the web service.
?
function OnCallBack(results, userContext)
{
switch(userContext.contextKey)
{
case "MSFT":
SPAN1.innerHTML = "Microsoft " + results;
break;
case "AAPL":
SPAN2.innerHTML = "Apple " + results;
break;
}
}
Using the same callback for different web methods?
This scenario is similar to using the same callback for multiple calls with the exception that you have two separate web service methods on the client that are using the same callback method. In this scenario, you include a third input parameter on the callback function to receive the web service call that the response is associated to.
?
For example, you have two Web Methods that your function needs to call, but you want to have a single callback method. You can tell which web method is returning by accessing the optional third input parameter to the callback function.
?
On the server you have:
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[Microsoft.Web.Script.Services.ScriptService]
public class Parts : System.Web.Services.WebService
{
[WebMethod]
public string EchoString(String s)
{
return s;
}
[WebMethod]
public string AnotherEchoString(String s)
{
return s;
}
}
?
On the client you have a button that has an onclick method calling GetEcho() function in JavaScript:
?
function GetEcho()
{
Parts.EchoString("This is echo number 1", OnCallBack);
Parts.AnotherEchoString("Another echo string!", OnCallBack);
}
function OnCallBack(results, userContext, sender)
{
alert(results + "\n" + sender);
}
?
When OnCallBack runs, you will get an alert dialog with the string you passed to the web service along with Parts.EchoString or Parts.AnotherEchoString.
Passing and receiving a server type?
As mentioned previously, the AJAX networking stack will generate proxy scripts for any server type that is referenced as an input or output parameter by the web methods contained in linked web services. This allows a developer to access these types on the client in a similar fashion as they would on the server. The types are serialized using JSON serialization which is covered in the next lesson.
?
For example, let's say you have the following web service called PeopleServices. This web service has a method called NewPerson that takes in 3 parameters; 2 Person objects and 1 object of type bool. The return value is also of type Person.
?
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[Microsoft.Web.Script.Services.ScriptService]
public class PeopleServices : System.Web.Services.WebService
{
?
[WebMethod]
public Person NewPerson(Person parent1, Person parent2, bool female)
{
Person _newPerson = new Person();
//Do other work
return _newPerson;
}
}
When you add this web service to the ScriptManager, the client will make a request for the proxy script as discussed in the Proxy Generation section. The result is that the Proxy script will have the web service method as well as the properties for the Person class. The person class is defined as the following on the server:
?
public class Person
{
public string Name
{
get { return _name; }
set { _name = value; }
}
public int Age
{
get { return _age; }
set { _age = value; }
}
public int Height
{
get { return _height; }
set { _height = value; }
}
}
?
On the client, you would need to generate two objects of type Person and pass them as parameters to the web service. In the callback script, the result parameter will be of type Person. Here's a sample JavaScript function that takes the values of textboxes on the page and creates two Person objects, then calls the NewPerson object on the above web service.
?
function GetNewPerson()
{
var person1 = new Person();
var _name = document.getElementById('p1FirstName');
var _age = document.getElementById('p1Age');
var _height = document.getElementById('p1Height');
person1.Name = _name.value;
person1.Age = _age.value;
person1.Height = _height.value;
?
var person2 = new Person();
_name = document.getElementById('p2FirstName');
_age = document.getElementById('p2Age');
_height = document.getElementById('p2Height');
?
person2.Name = _name.value;
person2.Age = _age.value;
person2.Height = _height.value;
PeopleServices.NewPerson(person1, person2, true, OnCallbackGetNewPerson, OnError);
}
?
Here is a sample callback function that handles the return type from the NewPerson method. The result parameter is a Person object and you can directly access the properties. In this case NewPerson is the ID on a Div in the page.
?
function OnCallbackGetNewPerson(result)
{
var newPerson = result;
NewPerson.innerHTML = "New Person <br/>";
NewPerson.innerHTML += "Name: " + newPerson.Name + "<br />";
NewPerson.innerHTML += "Age: " + newPerson.Age + "<br />";
NewPerson.innerHTML += "Height: " + newPerson.Height + "<br />";
}
When you run pages that make these calls and check out the network traffic, you'll see the following:
Web service call is a POST to …/PeopleService.asmx/js/NewPerson. Since the request ends in /js/NewPerson, the AJAX HttpHandler will handle the request to the web service. The Content-Type of the request is application/json.
Request Body contains all the data to create the Person object on the server. The main piece is the __type parameter which tells the server what type to create:
?
{"parent1":{"__type":"Person","Name":"Name1","Age":"12","Height":"60"},"parent2":{"__type":"Person","Name":"Name2","Age":"24","Height":"72"},"female":true}
The response also has a Content-Type of application/json and has a similar body containing the __type parameter and values necessary to create the Person object on the client:
?
{"__type":"Person","Name":"Name1name2ella","Age":23,"Height":71}
?Demo is FireForgetDemo.aspx
?
Wish the above can help you.

AJAX breaks URL rewriting : Microsoft JScript runtime error: Sys is undefined

Hey all,

My development machine is Windows XP. I'm using Intelligencia's URLRewriter.NET httpmodule to handle URL rewriting. I'm also using ScottGu's Form Control Adapter trick to catch postbacks.

Here's the problem - Sometimes, AJAX will fail. The controls inside the UpdatePanels will work. However, they will cause the whole page to refresh instead of just the area inside the UpdatePanels. This bug happens randomly. After days of working on this problem, I have not found a way to reproduce the bug. This has been very, very frustrating.

When I attach the Visual Studio debugger to IE, the page will break on this line :
Sys.WebForms.PageRequestManager._initialize('ScriptManager1', document.getElementById('form1'));

This is the error that I get :
Microsoft JScript runtime error: 'Sys' is undefined

When I try to debug the page in Firefox using the FireBug plugin, I get the five following errors :

I'll get three errors for the following line :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
One of those errors comes from WebResource.axd, and two of them come from ScriptResource.axd

I'll get a "Sys is not defined" error from my index.aspx, although FireBug apparently doesn't know which line is throwing the error.

Finally, I'll get a "Sys is not defined" error from this line in my index.aspx:
Sys.WebForms.PageRequestManager._initialize('ScriptManager1', document.getElementById('form1'));

I can solve the problem temporarily by disabling the UrlRewriter. There's a line in web.config that specifies when the URLRewriter should rewrite a URL. After I take this line out of the web.config, I'll reload a page on the site, and AJAX will be working fine again. I'll then put the line back in web.config, thus enabling the URLRewriter. AJAX will continue to work fine. In other words, by taking out the URLRewriter and putting it back in again, the problem will be solved until the next time it randomly happens again. Weird, huh?

If you have any insight at all into the nature of this problem, please let me know. Likewise, if you can tell me how to debug this monster, please let me know, as I am at an utter loss at this point.

I believe UrlRewriter allows you to add exclusions based on header data. If so, exclude any requests with the request header "X-MicrosoftAjax: Delta=true". That will prevent it from interfering with any partial postbacks.

Thanks for the advice! This bug has driven me *insane!* I swear, I must have spent at least 2 1/2 days on this thing.

Fortunately, I think I made a breakthrough today.

URLRewriter.NET requires that you specify which URLs to intercept. Naively, I had given it the following configuration :
<rewrite url="(.*)" to="${UrlTransformer($1)}" /
Basically, I had told it to intercept all incoming URLs. I think this was a mistake.

Somebody on a forum suggested that, if you get the "Sys is undefined" error, you should try to take the URL for the ScriptResource.axd file and paste it into your address bar and see what happens. When I did that, instead of being offered the opportunity to download ScriptResource.axd, I noticed that URLRewriter had picked up on the URL and was trying to do a rewrite! This could mean that IIS never properly received the request for ScriptResource.axd, and thus the client never recieved it. This would explain the JScript error and subsequent AJAX failure.

I went ahead and entered the following new configuration for URLRewriter :
<rewrite url="^(.*\.aspx)$" to="${UrlTransformer($1)}" />

So now, it's only picking up URLs that end in .aspx. So far, everything is working exactly as it should. However, I am hesitant to close the case on this for two reasons :

1) This bug has been incredibly hairy, and there have been a few other occasions where I was *sure* I had solved the problem. Thus I am hesitant to call it prematurely.
2) The incredibly random nature of the bug. This is really what made this bug so difficult; the fact that there was no reliable way to reproduce it. Even if I am correct about the cause of the bug, why in the world would it occur so randomly? I know that the browser will cache the ScriptResource.axd code. Could the bug's occurance coincide with the browsers' cache being flushed? Was this problem really more likely to occur when the network was slow, or was I just imagining things? Why would removing the line from the web.config and then replacing it again make a difference?

I may never know the answers to these questions.

In any case, thank you for your help. Your suggestion will be the first thing that I try if my current solution doesn't work.

AJAX Breaks the asp:Treeview

It is also a generally unstable browsing and development experience, but there's enough posts on that already.

I have the .Net AJAX RC installed. Create a simple AXAJ enabled web site, add a Label to display the selected node values, and a treeview using an xmldatasource. The XML has to be somewhat deeply nested to get the bug, about 6 levels deep. Wrap it all in an update panel and watch it explode when you try to navigate the tree.

protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
this.TreeNodeValue.Text = TreeView1.SelectedNode.Value + "::" + TreeView1.SelectedNode.Text;
}

<body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:UpdatePanel ID="updTreeView" runat="server"> <ContentTemplate> <asp:Label ID="TreeNodeValue" runat="server" /> <div> <asp:XmlDataSource ID="dsTreeview" runat="Server" XPath="entity" DataFile="~/App_Data/ReportsTree.xml" /> <asp:TreeView ID="TreeView1" runat="Server" DataSourceID="dsTreeview" ExpandDepth="2" NodeIndent="8" OnSelectedNodeChanged="TreeView1_SelectedNodeChanged"> <RootNodeStyle CssClass="RootNode" /> <ParentNodeStyle CssClass="ParentNode" /> <LeafNodeStyle CssClass="LeafNode" /> <HoverNodeStyle CssClass="HoverNode" /> <SelectedNodeStyle CssClass="SelectedNode" /> <NodeStyle CssClass="Node" /> <DataBindings> <asp:TreeNodeBinding DataMember="entity" TextField="name" ValueField="SubjectID" PopulateOnDemand="true" ToolTipField="name" ImageToolTipField="ResourceType" /> </DataBindings> </asp:TreeView> </div> </ContentTemplate> </asp:UpdatePanel> </form></body>
 
 
<entity SubjectID="1" ResourceType="Company" ImageURL="images/ResourceIcons/Company.gif" name="Company"><entity SubjectID="2" ResourceType="Application" ImageURL="images/ResourceIcons/Application.gif" name="Impact Analysis"><entity SubjectID="3" ResourceType="Scope" ImageURL="images/ResourceIcons/assembly.gif" name="Horizon"><entity SubjectID="4" ResourceType="Namespace" ImageURL="images/ResourceIcons/namespace.gif" name="Bip.Horizon.Holding"><entity SubjectID="5" ResourceType="ClassList" ImageURL="images/ResourceIcons/Folder.gif" name="Classes"><entity SubjectID="6" ResourceType="Class" ImageURL="images/ResourceIcons/Class.gif" name="Bip.Horizon.Holding.Holding" Modifier="Public" ClassType="Class"><entity SubjectID="7" ResourceType="MethodList" ImageURL="images/ResourceIcons/Folder.gif" name="Methods"><entity SubjectID="8" ResourceType="Method" ImageURL="images/ResourceIcons/Method.gif" name=" 'BIP.Horizon.Holding.Holding.GetProfileMarketCapAllocations" Modifier="Public"><entity SubjectID="9" ResourceType="Return Type" ImageURL="images/ResourceIcons/Class.gif" name="Return Type" DataType="System.Data.DataTable"></entity><entity SubjectID="10" ResourceType="Argument List" ImageURL="images/ResourceIcons/Folder.gif" name="Arguments"><entity SubjectID="11" ResourceType="Argument" ImageURL="images/ResourceIcons/Column.gif" name="dsRebalanceAdjustedHoldingsByAccount" DataType="BIP.Horizon.Holding.RebalanceAdjustedHoldingsByAccountDS" type="BIP.Horizon.Holding.RebalanceAdjustedHoldingsByAccountDS" Modifier="ByRef"></entity><entity Modifier="ByRef" SubjectID="12" ResourceType="Argument" ImageURL="images/ResourceIcons/Column.gif" name="dsProductMarketCapRange" DataType="BIP.Core.Product.ProductMarketCapRangeDS" type="BIP.Horizon.Holding.RebalanceAdjustedHoldingsByAccountDS"></entity><entity Modifier="ByRef" SubjectID="13" ResourceType="Argument" ImageURL="images/ResourceIcons/Column.gif" name="intMarketCapRangeID" DataType="int" type="int"></entity></entity><entity SubjectID="14" ResourceType="Call List" ImageURL="images/ResourceIcons/Folder.gif" name="Callers"><entity SubjectID="15" ResourceType="Method" ImageURL="images/ResourceIcons/Method.gif" name="BIP.Horizon.Web.UI.Account.aspx.cs"></entity></entity><entity SubjectID="16" ResourceType="Callee List" ImageURL="images/ResourceIcons/Folder.gif" name="Callees"><entity SubjectID="17" ResourceType="Method" ImageURL="images/ResourceIcons/Method.gif" name="BIP.Horizon.Product.GetMarketCapRanges"></entity></entity><entity SubjectID="18" ResourceType="Data Object List" ImageURL="images/ResourceIcons/Folder.gif" name="Data Objects"><entity SubjectID="19" ResourceType="DataObject" ImageURL="images/ResourceIcons/Database.gif" name="spbip.Horizon.Product.GetMarketCapRanges"></entity></entity></entity></entity></entity></entity></entity></entity></entity></entity>

 
 

The treeview control is not supported in the updatepanel by the docs. I hope this will be change in the future or we'll get a new real ajax treeview. I am using the treeview in updatepanel since the first ctps. I have some problems with it (for example with EnableClientScript="true"), but with some hacks it works for me.

The main problem for me that the treeview+updatpanel could be very slow, because the treeview needs enableviewstate="true" to works properly.Sad

First I world try to turn off any extra on the treeview especially this:

PopulateOnDemand="true" ->PopulateOnDemand="false"
I didn't try your code by I suppose that populating the nodes on the client side then expanding/collapsing/selecting a node could be easilystay out of the sync with the viewstate/server side.That was my problem with EnableClientScript="true".