Solved

ASP.NET/VB: "Imports"  causes error

Posted on 2013-12-17
3
803 Views
Last Modified: 2013-12-27
How can I import these without getting an error?
<%@ Page Language="VB" %>
<%

Imports System
Imports System.Xml
Imports System.IO
Imports System.Text

HttpContext.Current.Response.Write("Hello World")

%>

Open in new window

Compiler Error Message: BC30035: Syntax error.
0
Comment
Question by:hankknight
3 Comments
 
LVL 8

Assisted Solution

by:5teveo
5teveo earned 250 total points
ID: 39724427
try ...

<%@ import namespace="Imports System" %>
.
.
<%@ import namespace="Imports System.Text" %>


<%@ Page Language="VB" %>
<%

HttpContext.Current.Response.Write("Hello World")

%>
0
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 250 total points
ID: 39724442
should be :

<%@ Page Language="VB" %>

<%@Import namespace="System"%>
<%@Import namespace="System.Xml"%>
<%@Import namespace="System.IO"%>
<%@Import namespace="System.Text"%>

<%
HttpContext.Current.Response.Write("Hello World")
%> 

Open in new window

0
 
LVL 16

Author Comment

by:hankknight
ID: 39742026
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question