I'm looking for some help into why this web resource can't be found.
I have a third party solution. The demo has a class library project and a few demo pages. I downloaded it ran it, tested it on my local machine. It works!
In order to put it into my own website solution, I've taken the following steps.
- Created a new class project/solution
- Copies the class library objects .cs and 1 .js from the third party solution into my new class project.
- Added my new project into my web solution
However I'm getting errors which turn out to be 404 not found reported by firebug.
The project only has a couple of references to the webresources so struggling as to how to make it work
using System.Web.UI;
// embedded javascript resource [assembly: WebResource( RuleValidation.Controls.RuleValidation.ScriptResName, "text/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";
}
}
Where RuleValidation.Controls is the namespace of the embedded project files.
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 );
}
}
}
Help!!