Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using two dropdown controls in my .net application. the data for the second dropdown is loaded based on the first dropdown selection. Currently i am using the autopostback property but this will refresh the complete page.I want to prevent the postback but when i use an update panel, for some reason the other functionality where i am copying a file to the server is not working. Is there any other way that i can prevent the postback without using update panel? or is there any telerik control that i can use?
Posted
Comments
Kornfeld Eliyahu Peter 24-Nov-14 9:56am    
Partial page refresh...AJAX...

1 solution

As you have mentioned that you are using the Telerik Controls.
You can use "RadAjaxManager1" to prevent your postback .
In your page load you can use the below code.

C#
 ScriptManager _scriptMan = ScriptManager.GetCurrent(this);
        _scriptMan.AsyncPostBackTimeout = 36000;
 RadAjaxManager1.AjaxSettings.AddAjaxSetting(Combobox1, Combobox2);

// here you can see in my page load i will add all the controls which have events to avoid the postback.
// For example here you can see i have used the Radgrid to avoid postback during sorting,paging and etc.
       RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadGrid1, RadGrid1);
        RadAjaxManager1.AjaxSettings.AddAjaxSetting(btnSearch, RadGrid1);

        RadAjaxManager1.AjaxSettings.AddAjaxSetting(cmdPlant, cmdCarCd);
        RadAjaxManager1.AjaxSettings.AddAjaxSetting(txtCustCD, cmdCarCd);
        RadAjaxManager1.AjaxSettings.AddAjaxSetting(btnCustCD, cmdCarCd);


You can find more details from telerik Web site
http://www.telerik.com/help/aspnet-ajax/ajax-ajaxmanager.html[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900