locked
How can i import the Namespace, System.IO in VS 2005? RRS feed

  • Question

  • User-41659616 posted

    How can i import the Namespace, System.IO in VS 2005 in order to deal with the Stream object?

    Monday, November 5, 2007 5:52 PM

Answers

  • User214117797 posted

    Thank you - where should i be placing this? after the line <%& Register Assembly = "Microsoft.....>

    or it doesnt matter where it is placed in the HTML page.

     

    Are you using code behinds or are you writing your code inline with your HTML?

    If code behinds just add the code right at the top of the class file.

    If inline code with HTML then do this

    <%@ Import Namespace="System.IO" %>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 5, 2007 6:47 PM

All replies

  • User214117797 posted

    How can i import the Namespace, System.IO in VS 2005 in order to deal with the Stream object?

    In C# you do it by adding this to the top of your class file

    using System.IO;

    in VB.NET

    imports System.IO

    Monday, November 5, 2007 6:35 PM
  • User-41659616 posted

    Thank you - where should i be placing this? after the line <%& Register Assembly = "Microsoft.....>

    or it doesnt matter where it is placed in the HTML page.

    Monday, November 5, 2007 6:41 PM
  • User-41659616 posted

    is this correct? when i put 'imports' i get an error

     

    <%@ import Namespace = "system.IO"%>

    Monday, November 5, 2007 6:44 PM
  • User214117797 posted

    Thank you - where should i be placing this? after the line <%& Register Assembly = "Microsoft.....>

    or it doesnt matter where it is placed in the HTML page.

     

    Are you using code behinds or are you writing your code inline with your HTML?

    If code behinds just add the code right at the top of the class file.

    If inline code with HTML then do this

    <%@ Import Namespace="System.IO" %>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 5, 2007 6:47 PM