1
我創建了一個事件接收器來觸發一個電子郵件,無論何時添加一個項目。在此事件中,接收器電子郵件將被傳遞給員工。在電子郵件內容中,我想提供一個鏈接,以便員工可以直接訪問網站。但在我的代碼中,我正面臨一些問題。這裏是我的代碼定位標記不適用於事件接收器
public string MailMsgBody_WU(string MailTo, SPItemEventProperties IERProperties)
{
string MMsgBody = "";
System.Diagnostics.Debug.WriteLine("Travel Request-MailMsgBody(): Begin");
try
{
MMsgBody += "<table>";
MMsgBody += "<tr><td>Hi,</td></tr>";
MMsgBody += "<tr><td><br></br></td></tr>";
MMsgBody += "<tr><td> New Calendar Item Event" + IERProperties.ListTitle + " has been added into learning portal.</td></tr>";
MMsgBody += "<tr><td><br></br></td></tr>";
MMsgBody += "<tr><td>Please click on the following link to view the details.</td></tr>";
MMsgBody += "<tr><td><br></br></td></tr>";
MMsgBody += "<tr><td><a href=" + http://tri02sharepoint:47709/Lists/Learning%20Calendar/calendar.aspx + ">Click Here</a></td></tr>";
MMsgBody += "<tr><td><br></br></td></tr>";
MMsgBody += "<tr><td><br></br></td></tr>";
MMsgBody += "<tr><td>Thanks,</td></tr>";
MMsgBody += "<tr><td>Learning Team</td></tr>";
MMsgBody += "</table>";
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine("Travel Request-MailMsgBody(): End" + ex.Message.ToString());
}
return MMsgBody;
}
我得到的錯誤
MMsgBody += "<tr><td><a href=" + http://tri02sharepoint:47709/Lists/Learning%20Calendar/calendar.aspx + ">Click Here</a></td></tr>";
的http:// < ----這裏是錯誤
這些都是錯誤
錯誤1無效的表達術語':'
錯誤2;預計
錯誤3;預計
親愛moontear ..其完美的工作非常感謝你。很多.. – Jpaul 2012-02-07 06:44:53