避免回发.

编程入门 行业动态 更新时间:2024-10-27 21:14:22
本文介绍了避免回发.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

海, 下拉列表加载时如何避免回发,请帮帮我. 我使用数据库绑定数据.我将尝试级联下拉列表,但不绑定数据. 谢谢.

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) { }

更多推荐

避免回发.

本文发布于:2023-11-25 01:10:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1627702.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!