Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Ajax Programming

TreeView checkboxes AutoPostBack with AJAX


Hello,

 There is a known problem with TreeView checkboxes in ASP.NET: they
can't do AutoPostBack. So I've solved this problem like this:

<script language="javascript" type="text/javascript">

function postbackOnCheck()
{
   var o = window.event.srcElement;
   if (o.tagName == 'INPUT' && o.type == 'checkbox' &&
       o.name != null && o.name.indexOf('CheckBox') > -1)
   {
      __doPostBack("","");
   }

}

</script>

<asp:TreeView onclick="postbackOnCheck()" ID="treeContent"
 runat="server"> ... And so on ... </TreeView> This way I get full
postback each time the user checks\unchecks the checkbox.

But now I want to modify this code in order to make use of AJAX: I
don't want the FULL postback, but I only want the tree itself to be
updated. Of course, I've started by placing it inside the UpdatePanel.
But what now? Can somebody help me with this issue?

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc