Solved

ASP.NET/VB: "Imports"  causes error

Posted on 2013-12-17
3
788 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

947 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now