Beginners question

Discussion in 'ASP .Net' started by Guest, Jul 24, 2007.

  1. Guest

    Guest Guest

    Hello, I am new to asp.net.
    I want to write an asp file that sends a gif image to my client img tag
    as follows:

    <img src=img_script.asp>Hello</img>

    In my img_script.asp file I therefore need to open the image
    with binary reader like so:

    Imports System.IO
    Dim fs As FileStream = New FileStream("c:\data.txt", FileMode.Open)
    Dim r As BinaryReader = New BinaryReader(fs)

    I received the following error:

    Technical Information (for support personnel)

    a.. Error Type:
    Active Server Pages, ASP 0221 (0x80004005)
    The specified 'Page Language="VB" AutoEventWireup="false"
    CodeFile="Default.aspx.vb" Inherits="_Default" ' option is unknown or
    invalid.
    /t.asp, line 1
    Thank you in advance for any assistance in solving this problem.
     
    Guest, Jul 24, 2007
    #1
    1. Advertising

  2. Hi johan

    > Hello, I am new to asp.net.
    > I want to write an asp file that sends a gif image to my client img tag
    > as follows:
    >
    > <img src=img_script.asp>Hello</img>

    ASP <> ASP.NET
    Use one of these, do not mix their file extension or syntax ;-)

    > In my img_script.asp file I therefore need to open the image
    > with binary reader like so: [...]

    Its better to use a HttpHandler instead of an ASPX Page.

    > I received the following error: [,,,]

    This is because you are using ASP.NET Code on a file with the extension from
    "old" classic asp -> site.asp

    --
    Gruss, Peter Bucher
    Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerland
    http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
    http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET
     
    Peter Bucher [MVP], Jul 24, 2007
    #2
    1. Advertising

  3. Guest

    Brandon Gano Guest

    Hi johan,

    You need to be sure you have ASP.NET installed on your web server, than use
    the .aspx extention instead of .asp.

    Brandon


    <johan> wrote in message news:...
    > Hello, I am new to asp.net.
    > I want to write an asp file that sends a gif image to my client img tag
    > as follows:
    >
    > <img src=img_script.asp>Hello</img>
    >
    > In my img_script.asp file I therefore need to open the image
    > with binary reader like so:
    >
    > Imports System.IO
    > Dim fs As FileStream = New FileStream("c:\data.txt", FileMode.Open)
    > Dim r As BinaryReader = New BinaryReader(fs)
    >
    > I received the following error:
    >
    > Technical Information (for support personnel)
    >
    > a.. Error Type:
    > Active Server Pages, ASP 0221 (0x80004005)
    > The specified 'Page Language="VB" AutoEventWireup="false"
    > CodeFile="Default.aspx.vb" Inherits="_Default" ' option is unknown or
    > invalid.
    > /t.asp, line 1
    > Thank you in advance for any assistance in solving this problem.
    >
    >
     
    Brandon Gano, Jul 24, 2007
    #3
  4. Guest

    Guest Guest

    I see, it does work now,

    How do I get intelisense to work? I am using vs2003 on a standalone aspx
    file?

    ....and how do I interface BinaryReader to Response.BinaryWrite?


    BinaryWrite expect a 'var' type

    Can I do it in one go or do I need to loop till EOF etc
     
    Guest, Jul 24, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex
    Replies:
    1
    Views:
    304
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Apr 19, 2004
  2. Mike P

    web service beginners question

    Mike P, Aug 18, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    764
    S. Justin Gengo
    Sep 21, 2004
  3. Roger stevenson

    Beginners Question Regarding Static Web Pages

    Roger stevenson, Apr 30, 2005, in forum: ASP .Net
    Replies:
    8
    Views:
    421
    Sam Samnah
    Jul 1, 2005
  4. Child
    Replies:
    2
    Views:
    1,036
    souri challa
    Jun 1, 2005
  5. =?Utf-8?B?Qi4gQ2hlcm5pY2s=?=

    Late night beginners question

    =?Utf-8?B?Qi4gQ2hlcm5pY2s=?=, Jul 31, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    370
    =?Utf-8?B?Qi4gQ2hlcm5pY2s=?=
    Jul 31, 2005
Loading...

Share This Page