当用户第二次单击按钮时,无法转换控件 [英] Not able to transfre the control when thw user click on the button second time

查看:57
本文介绍了当用户第二次单击按钮时,无法转换控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家
我在WinXP下使用VS2003.我的WebApp的WebForm带有html
表单中有一些搜索条件文本框,一旦用户填写了条件
然后点击提交按钮.我的应用程序将保留在同一WebForm中,但打开一个
framset目标中的弹出窗口显示为"body",以显示搜索结果.

所以我这样实现:

Hi, all
I am using VS2003 under WinXP. My WebApp has a WebForm which has a html
form has some search condition textbox, once the user fill in the condition
and click submit button. My app will stay in the same WebForm but open a
popup window in the framset target as "body" to show the search results.

So I implement like this:

protected void Button2_Click(object sender, EventArgs e)
{
  Session[search] = TextBox1.Text.ToString();
  Response.Write("<script>window.open('SearchResult.aspx','Body');</script>");
}



这对我来说可以.我得到的唯一问题是:如果用户单击
提交按钮超过一次控件将不会传递给其他网页的页面加载下面的代码是应将代码转移到的代码:



It works fine for me. The only problem I get is: If the user click the
submit button more than one time Control will not pass to the Page load of Other web page below is the code where the code should be transfer:

protected void Page_Load(object sender, EventArgs e)
{
  Stt1;
  stt;
  stt;
}

推荐答案

您可以在BackgroundWorker线程中编写启动画面,以避免用户重复单击,直到数据处理结束.
You can write splashscreen in BackgroundWorker thread to avoid the duplicate clicks by the user, till the data processing is over.


这篇关于当用户第二次单击按钮时,无法转换控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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