Welcome to Dream.In.Code
Become an Expert!

Join 150,025 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,542 people online right now. Registration is fast and FREE... Join Now!




VB ASP Help

 
Reply to this topicStart new topic

VB ASP Help, VB ASP Help

meighlow
12 Feb, 2008 - 10:05 PM
Post #1

New D.I.C Head
*

Joined: 27 Jan, 2008
Posts: 15

Hi Everyone,

I need to create a listbox with 4 choices for a VB sample exam such as:
<!--#include file="Definition.asp"-->
How can I accomplish this using VB/asp where it will ignore the tags? I have attempted Response.write (server.htmlEncode(<!--#include file="Definition.asp"-->) but it still shows up.

Thanks so much-

Meighlow
User is offlineProfile CardPM
+Quote Post

RodgerB
RE: VB ASP Help
13 Feb, 2008 - 12:02 AM
Post #2

D.I.C Lover
Group Icon

Joined: 21 Sep, 2007
Posts: 2,166



Thanked: 17 times
Dream Kudos: 2200
Expert In: Dot Net Technologies

My Contributions
I don't understand what you are trying to do, are you trying to comment out some VB.NET code? Comments can be delimited using the ' character if it's in a VB.NET code block. Again, i'm really confused as to what you are trying to do. tongue.gif
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: VB ASP Help
13 Feb, 2008 - 05:00 AM
Post #3

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Im with Rodger on this one, I'm not quite sure what you're asking for, so can you please provide a detailed explanation of what you're trying to achieve please. Also, moving this to the ASP.Net Forum, as it is more appropriate there than in the VB.Net Forum smile.gif
User is offlineProfile CardPM
+Quote Post

meighlow
RE: VB ASP Help
13 Feb, 2008 - 07:52 AM
Post #4

New D.I.C Head
*

Joined: 27 Jan, 2008
Posts: 15

Sorry for not being more clear. Our project is to write a program to test student on their knowledge of VB ASP. Some questions are in text box format and they read "How would you declare a variable called "x" in VB script". After the student answers the questions, they click submit. The info gets sent via action=POST and we haveanother file which grades it.

The initial part with the questions and choices is in a <form></form> I am having issues with a question that uses list boxes for input. The question to the student is:
Select which of the following gives the correct syntax to include a file in your ASP file:

A few of the choices in the list box are:
<!--#include file= "Definition.asp"-->
>!--#include file= "Definition.asp"--<
<!--#include file= "Definition.asp"--<

How can I enter this text as merely text to populate the listbox, and not have the program treat it like a piece of code?

Thanks so much- Meighlow
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: VB ASP Help
17 Feb, 2008 - 08:30 AM
Post #5

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
You could try the HTMLEncode function in VBScript/ASP, like this


CODE

Response.Write(Server.HTMLEncode("<!--#include file= ""Definition.asp""-->"))



Try that and see if it helps any smile.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 09:26PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month