Ask a Question related to ASP, Design and Development.
-
Mark Sippitt #1
Spaces
I have a problem with the following code :
Response.write rstContacts(1).Value
The above line prints "Andark Marine"
However the following only passes "Andark" and stops at
the space. How do I get over this ? Its the same with all
records.
Response.Write("<td align=center><a
ref=companycontacts.asp?Company=" & rstContacts(1).Value
& " target=_new><img src=images\contact.ico width=25
height=25 border=0></a></td>")
Thanks for our help
Mark
Mark Sippitt Guest
-
Spaces in column value
I have a column table in which the values have spaces, i.e. "2005 CRA 696." In my query, I want to account for various ways people may type that... -
Multiple Spaces
I want to type in multiple spaces in a text area, like ( ). How can I do this? Thanks David -
Non-breaking spaces???
Hi - I'm creating a justified text area in a graphic, but I want to be able to control the line breaks so that the company name doesn't split. ... -
[PHP] Removing Spaces
Jason Williard wrote: $new_string = str_replace(' ','',$old_string); ? -- ---John Holmes... Amazon Wishlist:... -
Removing Spaces
In parsing a file, I ended up with a number of variables that include spaces. Is there an easy way to remove a space from a variable? Jason -
Shailesh Humbad #2
Re: Spaces
Two things:
1. Use Chr(34) to put quotes around the href.
2. Use Server.UrlEncode to encode the link.
like this:
Response.Write("<td align=center><a
href="&Chr(34)&"companycontacts.asp?Company=" &
Server.UrlEncode(rstContacts(1).Value)&Chr(34)&
& " target=_new><img src=images\contact.ico width=25
height=25 border=0></a></td>")
If rst may contain nulls, then put urlencode into a function like this:
Function PrintEncoded(strValue)
If IsNull(strValue) Then
PrintEncoded = ""
Else
PrintEncoded = Server.UrlEncode(strValue)
End If
End Function
UrlEncode will give an error if it is given a null value.
Shailesh.
Mark Sippitt wrote:
> I have a problem with the following code :
>
> Response.write rstContacts(1).Value
>
> The above line prints "Andark Marine"
>
> However the following only passes "Andark" and stops at
> the space. How do I get over this ? Its the same with all
> records.
>
> Response.Write("<td align=center><a
> ref=companycontacts.asp?Company=" & rstContacts(1).Value
> & " target=_new><img src=images\contact.ico width=25
> height=25 border=0></a></td>")
>
> Thanks for our help
> Mark
>Shailesh Humbad Guest
-
Mats #3
Re: Spaces
Generally yo can't have spaces in a Querystring, parsing stops at the
space.(I've seen somewhere that Apache might tolerate it)
Mats
"Mark Sippitt" <msippitt@hotmail.com> wrote in message news:<081d01c35cb1$9f40b290$a501280a@phx.gbl>...> I have a problem with the following code :
>
> Response.write rstContacts(1).Value
>
> The above line prints "Andark Marine"
>
> However the following only passes "Andark" and stops at
> the space. How do I get over this ? Its the same with all
> records.
>
> Response.Write("<td align=center><a
> ref=companycontacts.asp?Company=" & rstContacts(1).Value
> & " target=_new><img src=images\contact.ico width=25
> height=25 border=0></a></td>")
>
> Thanks for our help
> MarkMats Guest
-
vivek #4
Re: Spaces
why use response.write to display a link which has zillion double quotes, to
put it in a more simple way do this:
end you asp tag
%>
<td align="center"><a href="contacts.asp?company=<%=rstContacts(1).Value %>"
target=_new><img src=images\contact.ico width=25<%> height=25 border=0></a></td>
then restart your asp code here
%>
Vivek
"Mark Sippitt" <msippitt@hotmail.com> wrote in message
news:081d01c35cb1$9f40b290$a501280a@phx.gbl...> I have a problem with the following code :
>
> Response.write rstContacts(1).Value
>
> The above line prints "Andark Marine"
>
> However the following only passes "Andark" and stops at
> the space. How do I get over this ? Its the same with all
> records.
>
> Response.Write("<td align=center><a
> ref=companycontacts.asp?Company=" & rstContacts(1).Value
> & " target=_new><img src=images\contact.ico width=25
> height=25 border=0></a></td>")
>
> Thanks for our help
> Mark
>
vivek Guest
-
Tom B #5
Re: Spaces
Response.Write "<td align=""center"">" & _
"<a href=""companycontacts.asp?Company=" & _
rstContacts(1).Value & _
""" target=_new>" & _
"<img src=""images\contact.ico"" width=""25""
height=""25"" border=""0""></a></td>"
All I've done is add double quotes around the properties of your tags. The
result will be
<td align="center"><a href="companycontacts.asp?Company=Andark Marine"><img
src="images\contact.ico" width="25" height="25" border="0"></a></td>
I've never tried but I'm pretty sure an ico file isn't going to show up on
IE
"Mark Sippitt" <msippitt@hotmail.com> wrote in message
news:081d01c35cb1$9f40b290$a501280a@phx.gbl...> I have a problem with the following code :
>
> Response.write rstContacts(1).Value
>
> The above line prints "Andark Marine"
>
> However the following only passes "Andark" and stops at
> the space. How do I get over this ? Its the same with all
> records.
>
> Response.Write("<td align=center><a
> ref=companycontacts.asp?Company=" & rstContacts(1).Value
> & " target=_new><img src=images\contact.ico width=25
> height=25 border=0></a></td>")
>
> Thanks for our help
> Mark
>
Tom B Guest
-
Mark Sippitt #6
Re: Spaces
Vivek,
I think you will find that method also does not work unfortunately, but
agree with you about the clarity, without the complication of double
quotes...
Mark Sippitt MIAP
Senior Developer
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Mark Sippitt Guest
-
vivek #7
Re: Spaces
It didnt work??
Vivek
"Mark Sippitt" <msippitt@hotmail.com> wrote in message
news:eQ1WiROXDHA.3268@tk2msftngp13.phx.gbl...> Vivek,
>
> I think you will find that method also does not work unfortunately, but
> agree with you about the clarity, without the complication of double
> quotes...
>
> Mark Sippitt MIAP
> Senior Developer
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
vivek Guest
-
Tom B #8
Re: Spaces
Why wouldn't it work. I do that sort of thing all the time.
"Mark Sippitt" <msippitt@hotmail.com> wrote in message
news:eQ1WiROXDHA.3268@tk2msftngp13.phx.gbl...> Vivek,
>
> I think you will find that method also does not work unfortunately, but
> agree with you about the clarity, without the complication of double
> quotes...
>
> Mark Sippitt MIAP
> Senior Developer
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Tom B Guest
-
Mark Schupp #9
Re: Spaces
The parameter value should also be urlencoded
Response.Write "<td align=""center"">" & _
"<a href=""companycontacts.asp?Company=" & _
Server.URLEncode(rstContacts(1).Value) & _
""" target=_new>" & _
"<img src=""images\contact.ico"" width=""25""
height=""25"" border=""0""></a></td>"
--
Mark Schupp
--
Head of Development
Integrity eLearning
Online Learning Solutions Provider
[email]mschupp@ielearning.com[/email]
[url]http://www.ielearning.com[/url]
714.637.9480 x17
"Tom B" <shuckle@hotmail.com> wrote in message
news:%23jKJBMOXDHA.656@tk2msftngp13.phx.gbl...The> Response.Write "<td align=""center"">" & _
> "<a href=""companycontacts.asp?Company=" & _
> rstContacts(1).Value & _
> """ target=_new>" & _
> "<img src=""images\contact.ico"" width=""25""
> height=""25"" border=""0""></a></td>"
>
> All I've done is add double quotes around the properties of your tags.Marine"><img> result will be
> <td align="center"><a href="companycontacts.asp?Company=Andark> src="images\contact.ico" width="25" height="25" border="0"></a></td>
>
> I've never tried but I'm pretty sure an ico file isn't going to show up on
> IE
>
>
>
> "Mark Sippitt" <msippitt@hotmail.com> wrote in message
> news:081d01c35cb1$9f40b290$a501280a@phx.gbl...>> > I have a problem with the following code :
> >
> > Response.write rstContacts(1).Value
> >
> > The above line prints "Andark Marine"
> >
> > However the following only passes "Andark" and stops at
> > the space. How do I get over this ? Its the same with all
> > records.
> >
> > Response.Write("<td align=center><a
> > ref=companycontacts.asp?Company=" & rstContacts(1).Value
> > & " target=_new><img src=images\contact.ico width=25
> > height=25 border=0></a></td>")
> >
> > Thanks for our help
> > Mark
> >
>
Mark Schupp Guest
-
[Chris F] #10
Spaces
Just a quick one, how can I add a space between words in my formtomail script. i know that by putting & VbCrLf
& it adds a line break but I need to be able to add a space.
--
Regards,
Chris.
[url]www.chrisf.has.it[/url]
[url]www.lascoronas10.has.it[/url]
[url]www.boro.rules.it[/url]
[url]www.chrisfuni.has.it[/url]
[Chris F] Guest
-
Evertjan. #11
Re: Spaces
[Chris F] wrote on 09 sep 2003 in
microsoft.public.inetserver.asp.general:
& " " &> Just a quick one, how can I add a space between words in my formtomail
> script. i know that by putting & VbCrLf & it adds a line break but I
> need to be able to add a space.
>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Evertjan. Guest



Reply With Quote

