没看明白你的问题,呵呵,是完全手写的ajax,还是用的哪个ajax框架(比如ajax.net)?页面a上的按钮在异步刷新控件里面还是在外面?当前页面(A)刷新的时候提示服务器找不到----是提示找不到服务器?还是提示服务器找不到页面B?或者是找不到页面A?呵呵,问题表达清楚啦,也许能更好的解决问题
解决方案 »
- 该怎样做才能在fckeditor的编辑区域中显示文本内容??
- http 500 错误!急~
- 访问被拒绝:“FreeTextBox”。 FreeTextBox 1.6.3 中文版的.只是将dllcopy过来就出这个问题
- 新人。。求助
- 急问,关于Asp表单提交由asp.net来处理的问题???
- 请问cl.exe怎么用,一些老的C++程序能不能使用它来编译?
- ASP.NET 目录问题
- 为什么我的treeview无法显示层次?
- 为什么按下回车键时会自动触发服务器端按钮的click事件?如何解决?
- javascript的正则表达式
- 老问题,重新问 关于DROPDOWNLIST
- 关于VS2005 GridView的问题
搂主,能把具体的错误贴出来吗?然后能说说你页面实现的功能
点击A上button打开子窗口B,A自己并没有关闭。A在刷新的时候先出现一个警告,"Internet Explore cannot open the internnet site http://localhost/ECappsWeb/Customer/QuotationDetails.aspx, operation aborted".点击这个alter的确认,页面显示"Cannot find server"
我是参照下面的网址
http://www.cnblogs.com/mvp33650/archive/2007/04/27/730319.html
我没有关闭A,A是主窗口,B时详细资料,是一个弹出窗口,因为点击按钮时候有postback,页面自动刷新。
-------------------------------
CS file
--------------------------------
protected void Page_Load(object sender, EventArgs e)
{
if (hidCustCode.Value != "N")
AjaxPro.Utility.RegisterTypeForAjax(typeof(Customer_QuotationDetails));
if (!Page.IsPostBack)
{
InitializePage();
AddAtribute();
if (PageMode != (int)AAEnumeration.PageMode.NULL)
{
BindData();
}
}
}
}
private void AddAtribute()
{
txtCUST_CODE.Attributes.Add("onfocus", "setControlOnFoucs()");
txtCUST_CODE.Attributes.Add("onblur", "setControlLostFoucs()");
btnAddItem.Attributes.Add("onClick", "setControlLostFoucs()");
btnSaveItem.Attributes.Add("onClick", "setControlLostFoucs()");
btnRetrieve.Attributes.Add("onClick", "setControlLostFoucs()");
} [AjaxMethod()]
public ArrayList GetCustomerCode(string strQuery)
{
//ArrayList items = AAPool.GetCustomerCode();
//For Testing
ArrayList items = new ArrayList();
for (int i = 0; i < 10; i++)
{
items.Add("A" + i.ToString());
items.Add("B" + i.ToString());
}
ArrayList selectItems = new ArrayList();
foreach (string str in items)
{
if (str.ToUpper().IndexOf(strQuery.ToUpper()) == 0)
{
selectItems.Add(str);
}
}
return selectItems;
}
protected void btnRetrieve_Click(object sender, EventArgs e)
{
Hashtable htable = new Hashtable();
htable.Add(AAConstant.PageMode, (int)AAEnumeration.PageMode.ADD);
ClientScript.RegisterStartupScript(this.GetType(), otherQuotation, GetSecondDetailsURL(htable,
Constant.RetrieveFromOtherQuotationUI, otherQuotation));
}--------------------------------
aspx file
--------------------------------
<script language="jscript">
mainLoop = function()
{
val = escape( queryField.value );
if( lastVal != val && document.getElementById('hidCustCode').value == 'Y' )
{
//alert("div " + document.getElementById('hidCustCode').value);
var response = Customer_QuotationDetails.GetCustomerCode( val );
showQueryDiv( response.value );
lastVal = val;
}
setTimeout('mainLoop()', 100);
return true;
}
function setControlOnFoucs()
{
document.getElementById('hidCustCode').value = 'Y';
}
function setControlLostFoucs()
{
document.getElementById(ctrlID).value = 'N';
}
</script>
<asp:TextBox ID="txtCUST_CODE" runat="server" Width="90%"> </asp:TextBox>
<script language="jscript">InitQueryCode("" + '<%= txtCUST_CODE.ClientID %>' + "");</script>
----------------------------------------------------------------------------