Question: Adding "Imports Telerik.Web.UI" to the page

3 posts, 1 answers
  1. R2
    R2 avatar
    63 posts
    Member since:
    Sep 2007

    Posted 10 Dec 2008 Link to this post

    Hello,

    On page 25, section 1.6 "Before You Begin..." of the training guide states to add the above statement to a project file.  Where exactly do I add that?  I opened the code behind file and this is what I did:

     Partial Class _Default  

     

        Inherits System.Web.UI.Page 

      Imports Telerik.Web.UI 

     

     

     

     

    End Class

     

     

    However, "Imports" has a crinkled underline beneath it with a message saying: "Import statements must precede any declarations".  I've moved the  "Imports Telerik.Web.UI" above the "Inherits" statement and above the Partial Class line, however I still get the crinkled underlines.  Where exactly do I put the  "Imports Telerik.Web.UI"  in the Default.aspx.vb file?  
  2. Answer
    Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 10 Dec 2008 Link to this post

    Hey,

    Imports should appear as the very first statement; make sure it's at the top of the page, and that the Telerik.Web.UI DLL is referenced in the project too (the reference may be there, but pointing to a different directory possibly too).

    For some reason, the import is erroneously placed in that example.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. R2
    R2 avatar
    63 posts
    Member since:
    Sep 2007

    Posted 10 Dec 2008 Link to this post

    Thanks, Brian.  I put it at the very top of the code behind page as you said.  The crinkled line is gone.  :)
Back to Top