我在转换中遇到问题。 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