Introduction
To call server side events and functions from client side javascript function in asp.net.
Suppose we want to perform both client side and server side activities for an event,we can use this logic
Background
Three are 2 ways to acheive this functionality.
one using __dopostback() and another using form.submit(). Say you are having a client side javascript function named clientfunction. From clientfunction if u want to call any serverside function or serverside event(eg: dropdown selected index change) say server function and serverdropdown.
The code
Code:
function clientfunction
{
//do the client side validations here
//
//now call the server side dropdown event explicitly
__doPostBack('cboserverdropdown','');
}
Code:
function clientfunction
{
//do the client side validations here
//
//or just give below code
form.submit();
}


