Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Beginners question

Reply
Thread Tools

Beginners question

 
 
Guest
Posts: n/a
 
      07-24-2007
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.


 
Reply With Quote
 
 
 
 
Peter Bucher [MVP]
Guest
Posts: n/a
 
      07-24-2007
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

 
Reply With Quote
 
 
 
 
Brandon Gano
Guest
Posts: n/a
 
      07-24-2007
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:(E-Mail Removed)...
> 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.
>
>


 
Reply With Quote
 
Guest
Posts: n/a
 
      07-24-2007
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginners Question CHAZDG Wireless Networking 2 11-10-2005 12:29 AM
Beginners Question Regarding Static Web Pages Roger stevenson ASP .Net 8 07-01-2005 04:05 AM
Stupid beginners question: Windows Username Child ASP .Net 2 06-01-2005 08:03 PM
web service beginners question Mike P ASP .Net 3 09-21-2004 01:50 PM
Beginners question about DataGrid and page selection Alex ASP .Net 1 04-19-2004 08:36 PM



Advertisments