每次都重新加载ASP.Net页面 [英] ASP.Net Page reloads everytime

查看:107
本文介绍了每次都重新加载ASP.Net页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



Iam设计了一个具有多个从属下拉列表的ASP.net页面,如果每次每次重新加载asp页面时都更改DDl中的值(例如Flashng).请提供避免这种情况的建议.

您好,

好吧,您本可以在Google中进行搜索并找到答案,但是由于您没有这样做,我会为您提供更好的搜索方法:

搜索Google以在ASP.Net应用程序中使用AJAX.

这会给您答案.必须使用JavaScript代码发送请求并从服务器获取响应(这是页面请求,但对用户隐藏)来完成.

希望这会有所帮助,
Ed


通过以下方式绑定DropDownList.

if(!Page.IsPostBack)
{
    //Bind your DropDownList here in this block. 
}



我想这对您有帮助.


每当您从DropDownlList中选择一个不同的值,并且如果其他Dropdownlists依赖于上述值,则必须使用AutoPostBack = true;

在这种情况下,每次您从下拉列表中选择值时,都会闪烁并获取要填充到其他下拉列表中的数据.

要从用户删除此类Flash,可以使用Ajax或JavaScript阻止它.


Hi,

Iam designing a ASP.net pages with multiple dependent dropdown lists, If i change a value in a DDl every time my asp page reloading (like Flashng).Please give an sugetion to avoid this.

解决方案

Hi there,

Well, you could have searched this in Google and got the answer but as you haven''t I''ll give you a better search to do:

Search Google for using AJAX in ASP.Net applications.

This will get you your answer. It has to be done with JavaScript code sending requests and getting responses from your server which is a page request but hidden from the user.

Hope this helps,
Ed


Bind DropDownList in the following ways.

if(!Page.IsPostBack)
{
    //Bind your DropDownList here in this block. 
}



I think this help you.


Whenever you Select a Different Value from DropDownlList and if other Dropdownlists are Dependent on the above one, you have to use AutoPostBack = true;

In such case every time you select value from Dropdown, your will flash and get data to Fill into Other Dropdown Lists.

For removing such Flash from User, you can you Ajax or JavaScript to block this.


这篇关于每次都重新加载ASP.Net页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆