NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: bekeland on March 11, 2011, 02:32:26 PM
-
Using NT 4.53. I want to serve a file on a NetWebForm from a variable. I think it should look like this:
<pre>
<!-- Net:f:<!-- Net:s:FileLink2 --> -->
</pre>
NetTalk gives me a file not found, then the text of the session variable, and the rest of the page. So it knows I want a file, but doesn't use the session variable as the file name. Is there some way I can do this? It looks like the Net:f: has to be a fixed file name? Is there some other way this can be done with a simple statement similar to the above?
Right now I get by with calling a proc and reading the file in line by line and using SendPacket. It works, but thought there should be something better. Thanks!
Brian Ekeland
-
Check out the serve document example. It's a bit more involved than what you are trying to do but it works.
-
Hi Brian,
I haven't tried it, but if you make a netweb source, that creates a single line of html, then it should work.
The single line being the <!-- Net:f:filename -->
something like;
packet = '<!-- Net:f:' & p_web.GetSessionValue('fileLink2') & ' -->'
cheers
Bruce
-
Bruce,
Thank you so much. I was able to do that and it works much better than what I was doing. You don't get paid enough!
Brian
-
>> You don't get paid enough!
I agree <g>.
cheers
Bruce
-
Yes
But he lives in the Western Cape which is like getting a 50% increase anyway.
-
oh, Terry, Terry, Terry....
You don't know how much of a struggle it is to be surrounded by stunning mountains, sandy beaches, turquoise blue oceans, sunny weather and rolling vineyards. But someone has to do it.....
Suffer for my craft I must....
cheers
Bruce