0
我正在尋找一些幫助,爲什麼找不到這個網絡資源。找不到網絡資源404
我有第三方解決方案。該演示有一個類庫項目和一些演示頁面。我下載它運行它,在我的本地機器上測試它。有用!
爲了把它放到我自己的網站解決方案中,我採取了以下步驟。
- 創建一個新的類項目/解決方案
- 複製類庫 對象的.cs和第三方解決方案1周的.js到我的新 類項目。
- 增加了我的新項目進入我的網絡解決方案
但是我得到它變成是404沒有發現螢火蟲報告的錯誤。
該項目不僅具有如此掙扎於如何使webresources一對夫婦引用它使用的System.Web.UI工作
;
//嵌入的JavaScript資源 [裝配:WebResource(RuleValidation.Controls.RuleValidation.ScriptResName, 「文/ JavaScript的」)
namespace RuleValidation.Controls
{
public static class RuleValidation
{
public const string ScriptResName = "RuleValidation.Controls.RuleValidation.js";
public const string ScriptName = "ruleValidation";
public const string RenderEvaluationFunction = "evaluationfunction";
public const string RenderValidationType = "validationtype";
public const string RenderOperations = "operations";
public const string RenderSources = "sources";
public const string RenderScopes = "scopes";
public const string RenderCompareValues = "comparevalues";
public const string RenderCompareCounts = "comparecounts";
}
}
哪裏RuleValidation.Controls是嵌入式項目文件的命名空間。
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
if (RenderUplevel)
{
Type type = GetType();
if (!Page.ClientScript.IsClientScriptBlockRegistered(type, RuleValidation.ScriptResName))
{
Page.ClientScript.RegisterClientScriptResource(type, RuleValidation.ScriptResName);
}
}
}
幫助!!