Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Response.Write containing %>

Reply
Thread Tools

Response.Write containing %>

 
 
Dom
Guest
Posts: n/a
 
      06-21-2006
Hi,

I writing code that will create asp pages using the file system object. I'm
trying something like this without much luck

<%
..
..
'other code here

Response.Write "<%sName=" & Var & "%>"

%>

How can I do this?

Thanks, Dom


 
Reply With Quote
 
 
 
 
James Jones
Guest
Posts: n/a
 
      06-21-2006
now do you want VAR written out? or is that an actual variable on your
pages?



<%
Response.Write "<%sName=" & Var & "%>"
%> ^^ is that a variable you
are trying to write out? or do you want all that in quotes written out,
start with the first < and ending with the last >









"Dom" <nospam> wrote in message
news:%23L$(E-Mail Removed)...
> Hi,
>
> I writing code that will create asp pages using the file system object.
> I'm trying something like this without much luck
>
> <%
> .
> .
> 'other code here
>
> Response.Write "<%sName=" & Var & "%>"
>
> %>
>
> How can I do this?
>
> Thanks, Dom
>



 
Reply With Quote
 
 
 
 
Dom
Guest
Posts: n/a
 
      06-21-2006
This is the code I'm actually using:

<%
Dim oFileSystemObject, oFile, sFile, sPageContent

Set oFileSystemObject = CreateObject("Scripting.FileSystemObject")

sFile = Server.MapPath("/services/test_inc.asp")

Set oFile = oFileSystemObject.OpenTextFile(sFile, 1, false, 0)

sPageContent = "<%iProductID=" & iID & "%>"
sPageContent = sPageContent & oFile.ReadAll

Set oFile = oFileSystemObject.CreateTextFile("C:\Inetpub\wwwro o\test.asp",
true)

oFile.WriteLine(sPageContent)

oFile.Close()
Set oFile = Nothing
Set oFileSystemObject = Nothing
%>

"Dom" <nospam> wrote in message
news:%23L$(E-Mail Removed)...
> Hi,
>
> I writing code that will create asp pages using the file system object.
> I'm trying something like this without much luck
>
> <%
> .
> .
> 'other code here
>
> Response.Write "<%sName=" & Var & "%>"
>
> %>
>
> How can I do this?
>
> Thanks, Dom
>



 
Reply With Quote
 
Michael Kujawa
Guest
Posts: n/a
 
      06-21-2006
"Dom" <nospam> wrote in message
news:%23L$(E-Mail Removed)...
> Hi,
>
> I writing code that will create asp pages using the file system object.

I'm
> trying something like this without much luck
>
> <%
> .
> .
> 'other code here
>
> Response.Write "<%sName=" & Var & "%>"
>
> %>
>
> How can I do this?
>
> Thanks, Dom
>
>


try this

response.write "&lt;%sName=" & Var & "%&gt;"



 
Reply With Quote
 
Dom
Guest
Posts: n/a
 
      06-21-2006
> now do you want VAR written out? or is that an actual variable on your
> pages?
>
>
>
> <%
> Response.Write "<%sName=" & Var & "%>"
> %> ^^ is that a variable you
> are trying to write out? or do you want all that in quotes written out,
> start with the first < and ending with the last >


Var is a variable. I've posted the actual code.


 
Reply With Quote
 
Dom
Guest
Posts: n/a
 
      06-21-2006
This is the code I'm actually using:

<%
Dim oFileSystemObject, oFile, sFile, sPageContent

Set oFileSystemObject = CreateObject("Scripting.FileSystemObject")

sFile = Server.MapPath("/services/test_inc.asp")

Set oFile = oFileSystemObject.OpenTextFile(sFile, 1, false, 0)

sPageContent = "<%iProductID=" & iID & "%>"
sPageContent = sPageContent & oFile.ReadAll

Set oFile = oFileSystemObject.CreateTextFile("C:\Inetpub\wwwro o\test.asp",
true)

oFile.WriteLine(sPageContent)

oFile.Close()
Set oFile = Nothing
Set oFileSystemObject = Nothing
%>


 
Reply With Quote
 
James Jones
Guest
Posts: n/a
 
      06-21-2006
<%
var = "James Jones"
Response.Write "<%" & "sName = " & Var & "%>"
%>


that will display

<%sName=James Jones%>


<%
Response.Write "<%" & "sName = & Var & %>"
%>

that will display:

<%sName = & Var & %>






hope this was helpful






"Dom" <nospam> wrote in message
news:%(E-Mail Removed)...
> This is the code I'm actually using:
>
> <%
> Dim oFileSystemObject, oFile, sFile, sPageContent
>
> Set oFileSystemObject = CreateObject("Scripting.FileSystemObject")
>
> sFile = Server.MapPath("/services/test_inc.asp")
>
> Set oFile = oFileSystemObject.OpenTextFile(sFile, 1, false, 0)
>
> sPageContent = "<%iProductID=" & iID & "%>"
> sPageContent = sPageContent & oFile.ReadAll
>
> Set oFile = oFileSystemObject.CreateTextFile("C:\Inetpub\wwwro o\test.asp",
> true)
>
> oFile.WriteLine(sPageContent)
>
> oFile.Close()
> Set oFile = Nothing
> Set oFileSystemObject = Nothing
> %>
>



 
Reply With Quote
 
Dom
Guest
Posts: n/a
 
      06-21-2006
<%
> var = "James Jones"
> Response.Write "<%" & "sName = " & Var & "%>"
> %>
>
>
> that will display
>
> <%sName=James Jones%>
>
> <%
> Response.Write "<%" & "sName = & Var & %>"
> %>
>
> that will display:
>
> <%sName = & Var & %>
>
> hope this was helpful


It displays it on the page, however, IIS isn't processing it a VB script,
just outputting it as HTML.


 
Reply With Quote
 
James Jones
Guest
Posts: n/a
 
      06-21-2006
what are you wanting it to display exactly?


type in what you are wanting to show, if you could














"Dom" <nospam> wrote in message
news:(E-Mail Removed)...
> <%
>> var = "James Jones"
>> Response.Write "<%" & "sName = " & Var & "%>"
>> %>
>>
>>
>> that will display
>>
>> <%sName=James Jones%>
>>
>> <%
>> Response.Write "<%" & "sName = & Var & %>"
>> %>
>>
>> that will display:
>>
>> <%sName = & Var & %>
>>
>> hope this was helpful

>
> It displays it on the page, however, IIS isn't processing it a VB script,
> just outputting it as HTML.
>
>



 
Reply With Quote
 
Dom
Guest
Posts: n/a
 
      06-21-2006
"James Jones" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> what are you wanting it to display exactly?
>
>
> type in what you are wanting to show, if you could
>

I want the script to assign data to the variable correctly.

I posted the actual code earlier if you look through previous posts. I'm
trying to create an asp page using the file system object with embedded vb
scripts. Driving me bonkers now!


 
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
MCSE Server 2203 - a DVD containing training materials for 14 courses!!!! SP MCSE 13 12-09-2005 05:18 AM
displaying STDOUT containing multiple data entries Jeff Seale Perl 0 03-05-2005 05:17 AM
How to call an external API function that takes a struct containing arrays as its parameter? Robert Rossney ASP .Net 0 09-01-2003 05:51 PM
Error when trying to add an Access DB Record containing a Long Integer type field using OLEDB in ADO.Net Robert Hanson ASP .Net 4 07-22-2003 01:40 PM
Re: One solution containing multiple projects and multiple hosts Stephen Miller ASP .Net 0 06-24-2003 12:55 PM



Advertisments