我在轉換中遇到問題。 Whate對這種轉換是錯誤的嗎?編譯器錯誤消息:無法將類型'long'隱式轉換爲'string'
以下是錯誤:
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0029: Cannot implicitly convert type 'long' to 'string'
if (hid_Action.Value.ToString().ToUpper() == "RENEW")
{
string strHFUpdate = string.Empty;
string srt = Convert.ToInt64(Session["AppId"] + ",'" + Session["CAAID"].ToString() + "','" + Session["UserType"].ToString() + "'");
strHFUpdate = "oea_sp_update_HF_MC_Renewal_Status " + srt;
rProxy.GlobalSaveData(Session["CountyName"].ToString().Trim(), strHFUpdate.ToString());
}
感謝您的幫助!
Not enough information ...什麼腳本語言?很明顯C#但你應該寫下來並標記它 – Omer 2011-06-13 18:10:50
可能是我沒有正確理解你,但它是用asp.net,C#編寫的。 – userstackoverflow 2011-06-13 18:13:47
這可能會幫助你:-http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/35a1ffd9-b82a-435d-9efb-2e8a779d24c0/ – 2011-06-13 18:15:05