我有一个MVC项目,我有一个全局函数返回url的。这里是其中之一:访问资源文件中的全局变量
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Account.Models
{
public class ApplicationStrings
{
public static string ApplicationString(){
return "http://localhost11234/Studentbook";
}
}
}
我有资源文件,我存储电子邮件正文为不同的电子邮件出去。这是一个嵌入式资源。
如何从我的资源文件中的全局函数中访问URL?
我尝试以下方法,但没有看到链接:
<html>
<body>
<br> Student ID : <a href= ApplicationStrings.ApplicationString() + ?id=JD1123>JD1123</a><br>
</body>
</html>
我看到以下内容:
Student ID : JD1123
这里JD1123是一个链接,该链接带我到“ApplicationStrings.ApplicationString ()“而不是”http:// localhost11234/Studentbook?id = JD1123“