c# - webmethod with if statements -


i have repeater data paging after scroll down,and same functionality (get data paging) after user click on button.

i have webmethod parameters described below

   [webmethod]    public static string getcustomers(int pageindex)    {     system.threading.thread.sleep(2000);     return getcustomersdata(pageindex,false,"").getxml();    } 

the same function getcustomersdata(); running after button click

protected void imagebutton1_click(object sender, imageclickeventargs e) {     rptcustomers.datasource = getcustomersdata(1,true,"22");     rptcustomers.databind(); } 

the first webmethod running after jquery call, , second 1 running after user click button.

the problem , in javascript file after scrolling down, webmethod running.

how stop that, mean if user click on button. want disable javascript or stop webmethod. if javascript detect there scroll down , webmethod run

the imagebutton click

 protected void imagebutton1_click(object sender, imageclickeventargs e) {     rptcustomers.datasource = getcustomersdata(1,true,"22");     rptcustomers.databind(); } 

thanks adivse


Comments

Popular posts from this blog

tcpdump - How to check if server received packet (acknowledged) -