locked
Custom control make script call an aspx page !! RRS feed

  • Question

  • User-140528697 posted

    Hi,

     How do i open an aspx file present inmy custom control from the javascript file which is also present in the dll..? I ve made the js file present in the library as an embedded resource To get an web page i get an error that the resource is not found

    Heres the code

    HtmlAnchor a = new HtmlAnchor();
     a.HRef = this.Page.ClientScript.GetWebResourceUrl(typeof(ChApp), "ClassLibrary.Testt.htm");
     a.InnerText = "help link";
     this.Controls.Add(new LiteralControl("<br />"));
    this.Controls.Add(a);

    I get an error

    The resource cannot be found. Http 404 basically a client error

    !! Any help would be appreciated..!!

    Thanks in advance,

    Regards,
    Francis P.           


     

    Tuesday, April 8, 2008 6:01 AM

Answers

  • User-140528697 posted

     Well i found an solution to it myself I was registering this page on the onPreRender event ..!! Which is not required ..!!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 8, 2008 8:05 AM