本文介绍了避免回发.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
海, 下拉列表加载时如何避免回发,请帮帮我. 我使用数据库绑定数据.我将尝试级联下拉列表,但不绑定数据. 谢谢.
Hai, How can i avoid the postback when the dropdown is loading please help me. i bind the data using database.i will try the cascading dropdown but its not bind the data. Thankyou.
推荐答案请使用以下过程绑定下拉菜单: Hi, bind your dropdown using below process: if(!isPostback) { BindDDL(); }
并编写一个绑定ddl的函数. 如果这是您的解决方案,请不要忘记标记. :-)
and write a function to bind ddl. Don''t forget to mark, if it is your solution. :-)
将DropDownList的AutoPostBack属性设置为false, 并且在页面加载状态下,您可以通过此方式处理帖子 Hi, set the AutoPostBack property of DropDownList to false, and in the page loading state you can handle the post back by this if(!this.Page.IsPostBack) { // do ... }
祝你好运
good luck
添加代码 if(IsPostBack == false) { } add code if(IsPostBack==false) { }
更多推荐
避免回发.
发布评论