主题:高手指教
private void btnSubmit_Click(object sender, System.EventArgs e)
{
BidSys.Item obj = new BidSys.Item();
string strStatus;
strStatus = obj.AddItem(txtItemName.Text,
txtItemDesc.Text,
Convert.ToDouble(txtAskPrice.Text),
Convert.ToDouble(txtNotifyPrice.Text),
Convert.ToInt32(Request.Cookies["PersonID"].Value),
Convert.ToDateTime(txtExpDate.Text));
try
{
Int32.Parse(strStatus);
Response.Redirect("MenuForRegisteredUsers.aspx");
}
catch (FormatException ex)
{
lblMsg.Text = "Error while adding the item. Please try again." + strStatus;
}
}
为什么编译的时候提示申明了变流ex,但从未使用过??
谢谢
{
BidSys.Item obj = new BidSys.Item();
string strStatus;
strStatus = obj.AddItem(txtItemName.Text,
txtItemDesc.Text,
Convert.ToDouble(txtAskPrice.Text),
Convert.ToDouble(txtNotifyPrice.Text),
Convert.ToInt32(Request.Cookies["PersonID"].Value),
Convert.ToDateTime(txtExpDate.Text));
try
{
Int32.Parse(strStatus);
Response.Redirect("MenuForRegisteredUsers.aspx");
}
catch (FormatException ex)
{
lblMsg.Text = "Error while adding the item. Please try again." + strStatus;
}
}
为什么编译的时候提示申明了变流ex,但从未使用过??
谢谢