AJAX Page - JSVisible attribute

Using this attribute to a server method makes that method available also on client side.

Server Side
		
        [JSVisible]
        public string ComputeAge(string name, int yearBorn, int yearNow)
        {
            int age = yearNow - yearBorn;
            return name + " is " + age + " years old.";
        }
		


Client Side
		
        // instead of
        AddParam("yearBorn", 1982);
        AddParam("yearNow", 2006);
        AddParam("name", "John");
		
        alert(ob_post.post(null, "ComputeAge"));

		
        // you can use
        alert(ComputeAge("John", 1982, 2006));
		

"It is amazing how you guys have the tools that suits our needs to the "T" and I'm really glad to see that these tools are compatible with 3.5 as we would be moving there shortly."

Ramarao Prahalad
Texas Association of School Boards