再发一帖,服务器按钮控件不响应。

killxtt 2008-07-21 11:26:53
http://topic.csdn.net/u/20080717/16/3c30fe5f-c961-455b-b62f-32ab71b0659d.html
问题在上面这个链接,始终没有找到问题所在,最烦恼的就是我测试的电脑都没有问题,真正用到的地方都不行。分不够我可以再加
...全文
154 22 打赏 收藏 转发到动态 举报
写回复
用AI写文章
22 条回复
切换为时间正序
请发表友善的回复…
发表回复
killxtt 2008-07-25
  • 打赏
  • 举报
回复
发现问题了,说来简直要笑死,现场是用adsl,用一台TPlink的无线小路由器拨号并接交换机后接到终端电脑。今天我用笔记本做服务器,用出问题的内网机器访问我的笔记本就没有问题,所以我判断应该是网络的问题,把出问题的台式机直接接在adsl猫上,拨号,上网,访问,正常。。。。。。兴奋与郁闷一起来了。唉,至少能定位出问题的部位,原因我分析应该是丢包,但是还是不能完美的解释问题的状况。希望大家能解答,我晚两天结贴,看看会不会有好的答案。
大正他爹 2008-07-22
  • 打赏
  • 举报
回复
前几天我也碰到个这样的问题,查了原因没有找出,最后重新了代码,可以了。
killxtt 2008-07-22
  • 打赏
  • 举报
回复
[Quote=引用 13 楼 Ivy_zheng 的回复:]
如果非常慢,很可能是数据库系统的原因,数据库没有执行完。

检查登录用户的权限,数据库设置等(如缓冲)
[/Quote]

这个思路我可以试试,不过能解释有些客户机运行没有问题,有些会出现这种状况的原因吗。
killxtt 2008-07-22
  • 打赏
  • 举报
回复
[Quote=引用 19 楼 fellowcheng 的回复:]
只是某台机器上的话,可能机器上装了什么下载插件,比如QQ旋风\讯雷什么的
[/Quote]

是现场的四台都不行,而且我还特意重装了一台的系统,也不行
fellowcheng 2008-07-22
  • 打赏
  • 举报
回复
只是某台机器上的话,可能机器上装了什么下载插件,比如QQ旋风\讯雷什么的
紫气东来_999 2008-07-22
  • 打赏
  • 举报
回复
前台注意要  runat = "server"
killxtt 2008-07-22
  • 打赏
  • 举报
回复
但是我之前拿自己笔记本去就没有问题,通过内外网地址访问都没有问题
killxtt 2008-07-22
  • 打赏
  • 举报
回复
最新进展,昨天我搬了台电脑过去,这台电脑在内网通过内网地址访问服务器是没有问题的,但是到了现场通过互联网地址访问服务器就出现了同样的问题
zhnzzy 2008-07-21
  • 打赏
  • 举报
回复
是的,给个代码
cheng_feng001 2008-07-21
  • 打赏
  • 举报
回复
翠花,上代码!
killxtt 2008-07-21
  • 打赏
  • 举报
回复
已经加入到信任站点了,新装系统什么都没有装也不行。
我定制查询的那个页面在生成查询条件的时候甚至都没有读取数据库,但是只执行第一次点击的按钮。
  • 打赏
  • 举报
回复


1、找两个样本,操作系统一样,ie一样,一个可以运行,一个不可以运行。仔细对比程序环境差别

2、是不是ie设置问题。你把你的站点加入到客户端信任站点然后试试

3、关闭有问题机器的所有杀毒软件,防火墙之类

4、找风水大师~~~ ^_^


mengxj85 2008-07-21
  • 打赏
  • 举报
回复
有可能是IE中毒了,也有可能是ASPX文件里的控件属性写错了,比如加上不该加的属性
最后一只恐龙 2008-07-21
  • 打赏
  • 举报
回复
如果非常慢,很可能是数据库系统的原因,数据库没有执行完。

检查登录用户的权限,数据库设置等(如缓冲)
killxtt 2008-07-21
  • 打赏
  • 举报
回复
需要怎么修改
yulin2008yulin 2008-07-21
  • 打赏
  • 举报
回复
你好.你可以制作网站后台管理吗?我这里有个小型网站,主页面只有五个栏目,需要开发一个简单
的后台管理.如有意请与我联系.或者是你的朋友如会这样的技术也可以.
我的Email: yulin_yulin5188@yahoo.com.cn.请尽快与我联系.
killxtt 2008-07-21
  • 打赏
  • 举报
回复
今天又去测试了一下,感觉并不是没有反应了,但是非常慢,最后就和服务器失去联系了,是不是需要修改服务器配置?
killxtt 2008-07-21
  • 打赏
  • 举报
回复
以下是代码,表名和字段名用.....代替了


private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
if (!IsPostBack)
{
//是否登录
if (Session["ModuleNameList"]==null)
{
Response.Redirect("../../index0.aspx");
Response.End();
}
if(!con.InUserList(Application["UserList"].ToString(),Session["ShortName"].ToString()))
{
Response.Write("<script language=javascript>alert('你已经被管理员T,请重新登录!:(')</script>");
Response.Redirect("../index0.aspx");
}

//绑定列名下拉列表
string Select_Sql="SELECT * FROM Tab_TableColumn WHERE (TabCol_TableCode = N'E......') AND (TabCol_Used = 1)";
////此处为一自定义函数,帮定下拉列表,并决定是否要增加一个空白行
con.BindDropDownList(DropDownListColumn,Select_Sql,"TabCol_ColumnName","TabCol_ColumnCode","TabCol_ID",false,false);

TextBoxValue.Visible=true;
CalendarInput1.Visible=false;
DropdownlistType.Visible=false;
}
}

private void ButtonCCondition_Click(object sender, System.EventArgs e)
{
//字段名称不能为空
if(DropDownListColumn.SelectedItem.Text=="")
{
LabelError.Text="字段名称不能为空";
}
else
{
//正常则执行
LabelError.Text="";
string sqlstr1="";
string sqlstr="";
string textstr1="";
string textstr="";
if(RadioButtonOr.Checked==true && RadioButtonAnd.Checked==false)
{
sqlstr1=" or ";
textstr1=" 或者 ";
}
if(RadioButtonOr.Checked==false && RadioButtonAnd.Checked==true)
{
sqlstr1=" and ";
textstr1=" 并且 ";
}

string ValueStr="";

if (TextBoxValue.Visible==true)
{
//----------------------------------------------------------字符串,数字类型查询
ValueStr=TextBoxValue.Text;
}
else if(CalendarInput1.Visible==true)
{
//----------------------------------------------------------时间类型查询
ValueStr=CalendarInput1.Text;
}
else if(DDLBindDrop.Visible==true)
{
//----------------------------------------------------------类型查询
ValueStr=DDLBindDrop.SelectedValue;
}
else if(DDLTrueFalse.Visible==true)
{
//----------------------------------------------------------是否查询
ValueStr=DDLTrueFalse.SelectedValue;
}

///////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////
if(DropdownlistType.Visible==true)
{
sqlstr=DropDownListColumn.SelectedValue+" "+DropdownlistType.SelectedValue+" '"+ValueStr+"' ";
if(DDLTrueFalse.Visible==true)
{
textstr="("+DropDownListColumn.SelectedItem.Text+" "+DropdownlistType.SelectedItem.Text+" "+DDLTrueFalse.SelectedItem.Text+")";
}
else
{
textstr="("+DropDownListColumn.SelectedItem.Text+" "+DropdownlistType.SelectedItem.Text+" "+DDLBindDrop.SelectedItem.Text+")";
}
}
else
{
if(DropDownList2.SelectedValue=="like")
{
ValueStr="%"+ValueStr+"%";
}
sqlstr=DropDownListColumn.SelectedValue+" "+DropDownList2.SelectedValue+" "+"'"+ValueStr+"'";
textstr="("+DropDownListColumn.SelectedItem.Text+" "+DropDownList2.SelectedItem.Text+" "+ValueStr+")";
}

sqlstr=sqlstr1+sqlstr;
textstr=textstr1+textstr;
ListBoxCondition.Items.Add(new ListItem(textstr,sqlstr));
Radiojudge();
}
}

private void ButtonDCondition_Click(object sender, System.EventArgs e)
{//删除查询条件
if(ListBoxCondition.SelectedIndex==-1)
{
LabelError.Text="你没有选择查询条件!";
}
else
{
LabelError.Text="";
}
if(ListBoxCondition.Items.Count!=0)
{
if(ListBoxCondition.SelectedIndex>-1)
{
ListBoxCondition.Items.Remove(ListBoxCondition.SelectedItem);
}
}

if(ListBoxCondition.Items.Count!=0)
{
if (ListBoxCondition.Items[0].Text.StartsWith(" 并且 "))
{
ListBoxCondition.Items[0].Text=ListBoxCondition.Items[0].Text.Substring(4);
ListBoxCondition.Items[0].Value=ListBoxCondition.Items[0].Value.Substring(4);
}
if (ListBoxCondition.Items[0].Text.StartsWith(" 或者 "))
{
ListBoxCondition.Items[0].Text=ListBoxCondition.Items[0].Text.Substring(4);
ListBoxCondition.Items[0].Value=ListBoxCondition.Items[0].Value.Substring(4);
}
}

Radiojudge();
}

private void ButtonSearch_Click(object sender, System.EventArgs e)
{//查询
BindDataGrid("V.....");
}

private void ButtonPrint_Click(object sender, System.EventArgs e)
{

}

private void DataGridResult_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
DataGridResult.CurrentPageIndex=e.NewPageIndex;
BindDataGrid("V.....");
}

private void DataGridResult_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemIndex!=-1)
{
int OrderID=e.Item.ItemIndex+1;
e.Item.Cells[0].Text=(DataGridResult.CurrentPageIndex*DataGridResult.PageSize+OrderID).ToString();
}
if ((e.Item.ItemType==ListItemType.Item)||(e.Item.ItemType==ListItemType.AlternatingItem))
{
HyperLink HLNavID=new HyperLink();
HLNavID=(HyperLink)e.Item.FindControl("HLNavigator");
HLNavID.Text="点击此处至详细信息";
HLNavID.NavigateUrl=".......aspx?H...ID="+e.Item.Cells[1].Text.Trim(); }
}

private void DropDownListColumn_SelectedIndexChanged(object sender, System.EventArgs e)
{
string DDLValue=DropDownListColumn.SelectedItem.Value;
if(DDLValue=="EHF_Status")
{
//绑定状态列表
string Sql_Select_HouseStatus="SELECT * FROM E......";
con.BindDropDownList("EHS_ID","EHS_Status",Sql_Select_H.......,DDLBindDrop);
DDLBindDrop.Visible=true;
CalendarInput1.Visible=false;
TextBoxValue.Visible=false;
DropdownlistType.Visible=true;
DropDownList2.Visible=false;
DDLTrueFalse.Visible=false;
RequiredFieldValidatorValue.Enabled=false;
RangeValidatorValue.Enabled=false;
REVRealArea.Enabled=false;
}
else if (DDLValue=="EHF_.......")
{............ }
else if (DDLValue=="EHF_.......")
{
.............. }
else if (DDLValue=="EHF_.......")
{
............. }
else if (DDLValue=="EHF_.......")
{
............... }
//根据下拉列表选项确定验证控件是否工作,值得输入方式等。
}

/// <summary>
/// 绑定DataGrid
/// </summary>
private void BindDataGrid(string str_TableCode)
{
//生成条件语句
string ConditionStr="";
for(int i=0;i<ListBoxCondition.Items.Count;i++)
{
ConditionStr+=ListBoxCondition.Items[i].Value.Trim();
}

string command="select * from "+str_TableCode;
if (ConditionStr.Trim()!="")
{
command+=" where "+ConditionStr;
}
command+=" order by cast(EHF_......... AS int)";
int RowCount=0;
RowCount=con.BindDataGrid(DataGridResult,command,true,30,"",true);
LabelTotalCount.Text=" "+RowCount.ToString()+" 条";
}

/// <summary>
/// 判断listbox是否填充了内容、决定RadioButton的状态
/// </summary>
private void Radiojudge()
{
if(ListBoxCondition.Items.Count==0)
{
RadioButtonOr.Checked=false;
RadioButtonAnd.Checked=false;
RadioButtonOr.Enabled=false;
RadioButtonAnd.Enabled=false;
}
else
{
RadioButtonOr.Enabled=true;
RadioButtonAnd.Enabled=true;
RadioButtonOr.Checked=false;
RadioButtonAnd.Checked=true;
}
}
  • 打赏
  • 举报
回复
估计是浏览器问题
踏雪听雨 2008-07-21
  • 打赏
  • 举报
回复
把BUTTON的验计去掉试一下
causevalidation=false
加载更多回复(2)

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧