This is a migrated thread and some comments may be shown as answers.

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

2 Answers 203 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
R2
Top achievements
Rank 1
R2 asked on 10 Dec 2008, 03:15 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Brian Mains
Top achievements
Rank 1
answered on 10 Dec 2008, 08:01 PM
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.
0
R2
Top achievements
Rank 1
answered on 10 Dec 2008, 09:08 PM
Thanks, Brian.  I put it at the very top of the code behind page as you said.  The crinkled line is gone.  :)
Tags
Ajax
Asked by
R2
Top achievements
Rank 1
Answers by
Brian Mains
Top achievements
Rank 1
R2
Top achievements
Rank 1
Share this question
or