470,821 Members | 1,938 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,821 developers. It's quick & easy.

Write Positioning

Ken

Does any one know how I can position the output at certain
point? Such as If I want to print "hello" starting at
position 50 from the left in the file.

Ken
Jul 19 '05 #1
7 1310
What file? Just an normal html response? If so, you could probably do this
with some css stuff. Try asking in a group that covers css or html design.
I find comp.infosystems.www.authoring.stylesheets to be an alright group.

Ray at work

"Ken" <an*******@discussions.microsoft.com> wrote in message
news:0b****************************@phx.gbl...

Does any one know how I can position the output at certain
point? Such as If I want to print "hello" starting at
position 50 from the left in the file.

Ken

Jul 19 '05 #2
Ken
I am trying to print to simple flat file.
-----Original Message-----
What file? Just an normal html response? If so, you could probably do thiswith some css stuff. Try asking in a group that covers css or html design.I find comp.infosystems.www.authoring.stylesheets to be an alright group.
Ray at work

"Ken" <an*******@discussions.microsoft.com> wrote in messagenews:0b****************************@phx.gbl...

Does any one know how I can position the output at certain point? Such as If I want to print "hello" starting at
position 50 from the left in the file.

Ken

.

Jul 19 '05 #3
Print?

<% Response.Write String(49, " ") & "X" %>

That will put 49 spaces before X in the response.

Ray at work
"Ken" <an*******@discussions.microsoft.com> wrote in message
news:0c****************************@phx.gbl...
I am trying to print to simple flat file.
-----Original Message-----
What file? Just an normal html response? If so, you

could probably do this
with some css stuff. Try asking in a group that covers

css or html design.
I find comp.infosystems.www.authoring.stylesheets to be

an alright group.

Ray at work

"Ken" <an*******@discussions.microsoft.com> wrote in

message
news:0b****************************@phx.gbl...

Does any one know how I can position the output at certain point? Such as If I want to print "hello" starting at
position 50 from the left in the file.

Ken

.

Jul 19 '05 #4
If you have your response in a variable, like:
sTheResponse = "kja kjsd fjasldf8alkjlaudsfajsdlkfj alkjdiosfjaldkfj
alksjdfa98sdjflaksdjflkajsdf8jaslekfjal;sdifual;sd jf8asjdflakjsd
fiaj;dslifj"

You could do:

If Len(sTheResponse) > 49
sTheResponse = Left(sTheResponse, 49) & "hello" & Right(sTheResponse,
Len(sTheResponse) - 49)
Else
sTheResponse = Replace(Left(sTheResponse & String(49, " "), 49), " ",
"&nbsp;") & "hello"
End If

Response.Write sTheResponse
Ray at work
"Ken" <an*******@discussions.microsoft.com> wrote in message
news:07****************************@phx.gbl...
But if I print something before that?
I want to justify the location so even though there is
something printed before that "X", I want to make it print
exactly at the position 50.

p.s. sorry about opening up another thread.
-----Original Message-----
Print?

<% Response.Write String(49, " ") & "X" %>

That will put 49 spaces before X in the response.

Ray at work
"Ken" <an*******@discussions.microsoft.com> wrote in

message
news:0c****************************@phx.gbl...
I am trying to print to simple flat file.

>-----Original Message-----
>What file? Just an normal html response? If so, you
could probably do this
>with some css stuff. Try asking in a group that covers
css or html design.
>I find comp.infosystems.www.authoring.stylesheets to be
an alright group.
>
>Ray at work
>
>"Ken" <an*******@discussions.microsoft.com> wrote in
message
>news:0b****************************@phx.gbl...
>>
>> Does any one know how I can position the output at
certain
>> point? Such as If I want to print "hello" starting at
>> position 50 from the left in the file.
>>
>> Ken
>
>
>.
>

.

Jul 19 '05 #5
Ken
I thought about that, but I thought there must be some
command that justifies where it will print.
-----Original Message-----
If you have your response in a variable, like:
sTheResponse = "kja kjsd fjasldf8alkjlaudsfajsdlkfj alkjdiosfjaldkfjalksjdfa98sdjflaksdjflkajsdf8jaslekfjal;sdifual;s djf8asjdf lakjsdfiaj;dslifj"

You could do:

If Len(sTheResponse) > 49
sTheResponse = Left(sTheResponse, 49) & "hello" & Right(sTheResponse,Len(sTheResponse) - 49)
Else
sTheResponse = Replace(Left(sTheResponse & String (49, " "), 49), " "," ") & "hello"
End If

Response.Write sTheResponse
Ray at work
"Ken" <an*******@discussions.microsoft.com> wrote in messagenews:07****************************@phx.gbl...
But if I print something before that?
I want to justify the location so even though there is
something printed before that "X", I want to make it print exactly at the position 50.

p.s. sorry about opening up another thread.
>-----Original Message-----
>Print?
>
><% Response.Write String(49, " ") & "X" %>
>
>That will put 49 spaces before X in the response.
>
>Ray at work
>
>
>"Ken" <an*******@discussions.microsoft.com> wrote in

message
>news:0c****************************@phx.gbl...
>> I am trying to print to simple flat file.
>>
>> >-----Original Message-----
>> >What file? Just an normal html response? If so, you >> could probably do this
>> >with some css stuff. Try asking in a group that covers >> css or html design.
>> >I find comp.infosystems.www.authoring.stylesheets to be >> an alright group.
>> >
>> >Ray at work
>> >
>> >"Ken" <an*******@discussions.microsoft.com> wrote in
>> message
>> >news:0b****************************@phx.gbl...
>> >>
>> >> Does any one know how I can position the output at
>> certain
>> >> point? Such as If I want to print "hello" starting at >> >> position 50 from the left in the file.
>> >>
>> >> Ken
>> >
>> >
>> >.
>> >
>
>
>.
>

.

Jul 19 '05 #6
No, I don't believe there is. If there were, it'd be something like
Response.write "this text", 1, 50 for column, row, but like, that's really
not the way ASP works.

Just out of curiosity, what's the reason you want text in a specific spot?
You are "screen scraping" are you?

Ray at work

"Ken" <an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
I thought about that, but I thought there must be some
command that justifies where it will print.

Jul 19 '05 #7
Ken
No. I am trying to generate file that can be import into
certain program.
-----Original Message-----
No, I don't believe there is. If there were, it'd be something likeResponse.write "this text", 1, 50 for column, row, but like, that's reallynot the way ASP works.

Just out of curiosity, what's the reason you want text in a specific spot?You are "screen scraping" are you?

Ray at work

"Ken" <an*******@discussions.microsoft.com> wrote in messagenews:08****************************@phx.gbl...
I thought about that, but I thought there must be some
command that justifies where it will print.

.

Jul 19 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Thomas | last post: by
9 posts views Thread by Bryan R. Meyer | last post: by
4 posts views Thread by Jane Withnolastname | last post: by
14 posts views Thread by Harlan Messinger | last post: by
6 posts views Thread by rajek | last post: by
11 posts views Thread by NS | last post: by
1 post views Thread by Charles Harrison Caudill | last post: by
2 posts views Thread by Rob R. Ainscough | last post: by
6 posts views Thread by Mark | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.