我已經做了一個簡單的ASP.net網站,一切工作正常在我的電腦上。但在同事的電腦上,儘管他使用相同的操作系統(Win 7)和瀏覽器(IE9),但沒有發佈回覆。asp.net回傳不會觸發
我現在沒有任何訪問他的電腦,這使得它很難調試。有人知道什麼可以防止在一臺計算機上回發,儘管他們使用相同的瀏覽器在另一臺計算機上工作。 (我也嘗試了不同的瀏覽器和操作系統第3臺計算機上,它也是在那裏工作)
//更新:一些代碼
下面的代碼是哪裏出了問題occures的頁面之一。
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewList.aspx.cs" Inherits="QAList.NewList" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Items</title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<link href="qalist.css" rel="stylesheet" type="text/css" />
<script src="lib/jquery-1.4.3.min.js" type="text/javascript"></script>
<script src="lib/jquery-ui-1.8.5.custom.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/smoothness/jquery-ui-1.8.5.custom.css" type="text/css" media="screen" charset="utf-8" />
<style type="text/css">
input[disabled]
{
background-color:#888888;
}
.Filled
{
width: 98%;
}
.Property
{ margin-bottom: 0px;
}
.Date
{
/* this class is only used to indicate that the value is a DateTime value */
}
.PropertyTable td
{
border-bottom: 1px solid #D8D8D8;
padding:1px;
background-color:#F6F6F6;
}
.Suppler_style
{
color: #0000BB;
}
</style>
<script type="text/javascript">
$(function() {
$(".Date").datepicker({ dateFormat: "yy/mm/dd" });
});
</script>
</head>
<body>
<form id="form1" runat="server">
<table style="width: 80%;" border="0" class="PropertyTable" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 227px;">
Project Number</td>
<td>
<asp:TextBox ID="ProjectNumber" runat="server" CssClass="Property" Width="200px"></asp:TextBox>
<asp:Button ID="btApplyPnr" runat="server" Text=" apply "
onclick="btApplyPnr_Click" />
</td>
</tr>
<tr>
<td>
Contract No.</td>
<td>
<asp:DropDownList ID="ddContractNo" runat="server" AutoPostBack="True"
onselectedindexchanged="ContractNo_SelectedIndexChanged"
CssClass="Filled">
</asp:DropDownList>
<input type="hidden" class="Property" id="V_QA_PO_tp_listId" runat="server" />
<input type="hidden" class="Property" id="V_QA_PO_tp_ID" runat="server" />
<input type="hidden" class="Property" id="ContractNo" runat="server" />
</td>
</tr>
<tr>
<td>
ITP No</td>
<td>
<asp:TextBox ID="ITPNo" runat="server" CssClass="Filled Property"></asp:TextBox>
</td>
</tr>
<tr>
<td class="Suppler_style">
ITP Name</td>
<td>
<asp:TextBox ID="ITPName" runat="server" CssClass="Filled Property"></asp:TextBox>
</td>
</tr>
<tr>
<td class="Suppler_style">
Status Delivery/Finish Date</td>
<td>
<asp:TextBox ID="StatusDeliveryFinishDate" runat="server"
CssClass="Filled Property Date"></asp:TextBox>
</td>
</tr>
</table>
</form>
</body>
</html>
和C#-Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
namespace QAList
{
public partial class NewList : System.Web.UI.Page
{
private string current_contract = "0";
private string current_pnr;
protected void Page_Load(object sender, EventArgs e)
{
current_contract = ddContractNo.SelectedValue;
}
protected void Page_PreRender(object sender, EventArgs e)
{
//load Contract Numbers
ddContractNo.Items.Clear();
ddContractNo.Items.Add(new ListItem("-", "0"));
foreach (DataRow contract in DBAccess.Instance.getContractNumbers(current_pnr).Rows)
{
ddContractNo.Items.Add(new ListItem(contract["ProjectNumber"] + " - " + contract["ContractNo"] + " - " + contract["GoodsServicesSupplied"], contract["tp_listId"] + "_" + contract["tp_ID"]));
}
try
{
ddContractNo.SelectedValue = current_contract;
}
catch (ArgumentOutOfRangeException)
{
ddContractNo.SelectedValue = null;
applyNewContractValue();
}
}
protected void ContractNo_SelectedIndexChanged(object sender, EventArgs e)
{
applyNewContractValue();
}
private void applyNewContractValue()
{
current_contract = ddContractNo.SelectedValue;
if (!String.IsNullOrEmpty(current_contract) && current_contract != "0")
{
Guid tp_listId = new Guid(current_contract.Split('_')[0]);
int tp_ID = Convert.ToInt32(current_contract.Split('_')[1]);
DataRow row = DBAccess.Instance.getContractInfos(tp_listId, tp_ID);
if (row == null)
return;
ITPName.Text = row.IsNull("GoodsServicesSupplied") ? "" : row["GoodsServicesSupplied"].ToString();
if (!row.IsNull("PlannedDeliveryexworks"))
{
DateTime tmp = (DateTime)row["PlannedDeliveryexworks"];
StatusDeliveryFinishDate.Text = tmp.Year + "/" + fillZeros(tmp.Month, 2) + "/" + fillZeros(tmp.Day, 2);
}
}
else
{
ITPName.Text = "";
}
}
private string fillZeros(int nr, int min_length)
{
string res = nr.ToString();
while (res.Length < min_length)
res = "0" + res;
return res;
}
protected void btApplyPnr_Click(object sender, EventArgs e)
{
current_pnr = ProjectNumber.Text;
}
}
}
源代碼或其他什麼? –
沒有錯誤(檢查JavaScript錯誤)或任何東西? – CodingGorilla
讓他嘗試關閉和打開它。 :d –