Can't Seem to Get the Format Correct 
Author Message
 Can't Seem to Get the Format Correct

My brain seems to have given up.  I can't seem to figure out how to format
the following code so that I can insert the variable.  What I'm trying to do
is to insert the variable sSectionName where I've indicated.  I've tried
various combinations of single quote, double quote and  <%= %> until I'm
blue in the face.  I've indicated where in the code I'd like to insert the
variable on the line I've labeled 4.  Would someone please help?


<!--#include file="../db.conn.open.asp"-->
<!--#include file="../adovbs.inc"-->
<!--#include file="../incCategories.asp"-->
<%
DIM sType, sSectionName
sSectionName = Request.QueryString("section")
%>
<html>
(I've shortened the intermediate code)

1.  <td bgcolor="#FFFFFF">
2.  <div align="left">
3.  <img src="../Images/Menu%20Graphics/spacer.gif" width="185" height="45">
4.  <a
href="../Printer%20Friendly%20Version/NHG_PFSectionWriter.asp?sType=FAQ&Cate
gory= (I want to put the variable sSectionName here)  ">

<img src="../Images/Printer%20Friendly/printer_friendly.gif" width="87"
height="45" border="0"></a>
 <img src="../Images/Menu%20Graphics/spacer.gif" width="100" height="45"><a
href="javascript:emailArticle('Health_Concerns/allergies.asp')">
<img border="0" src="../Images/Printer%20Friendly/email_to_friend.gif"
width="75" height="44" alt="Email this Article">
</div>
</td>

Thanks, in advance.

D Long



Tue, 12 Apr 2005 22:51:06 GMT  
 Can't Seem to Get the Format Correct

Quote:

> My brain seems to have given up.  I can't seem to figure out how to format
> the following code so that I can insert the variable.  What I'm trying to do
> is to insert the variable sSectionName where I've indicated.  I've tried
> various combinations of single quote, double quote and  <%= %> until I'm
> blue in the face.  I've indicated where in the code I'd like to insert the
> variable on the line I've labeled 4.  Would someone please help?
[...]
> sSectionName = Request.QueryString("section")
[...]
> 4.  <a
> href="../Printer%20Friendly%20Version/NHG_PFSectionWriter.asp?sType=FAQ&Cate
> gory= (I want to put the variable sSectionName here)  ">

...Category=<%=sSectionName%>">

hth

Adam
--
I am Kennedy of Borg. Ask not what your collective can do for you
- ask what you can do for your collective



Tue, 12 Apr 2005 23:14:10 GMT  
 Can't Seem to Get the Format Correct
have you tried

<a href="../Printer%20Friendly%
20Version/NHG_PFSectionWriter.asp?sType=FAQ&Category= <%
=cstr(somevar)%> ">

works for me.



Tue, 12 Apr 2005 23:13:23 GMT  
 Can't Seem to Get the Format Correct
I hadn't tried the cstr function.  The plain old <%=sSectionName%> and that
didn't seem to work.

D Long


Quote:
> have you tried

> <a href="../Printer%20Friendly%
> 20Version/NHG_PFSectionWriter.asp?sType=FAQ&Category= <%
> =cstr(somevar)%> ">

> works for me.



Wed, 13 Apr 2005 05:23:16 GMT  
 Can't Seem to Get the Format Correct
Hi D Long,

I have tested the solution of <%=sSectionName%> and it worked fine.


<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>

<P>&nbsp;</P>

<%
DIM sType, sSectionName
sSectionName = "test"
%>

<a
href="../Printer%20Friendly%20Version/NHG_PFSectionWriter.asp?sType=FAQ&Cate
gory= <%=sSectionName%>">test</a>

</BODY>
</HTML>

Please copy the code above to a new ASP page and check whether it works or
not.

Gary

This posting is provided "AS IS", with no warranties, and confers no
rights. Enjoyed ASP.NET? http://www.asp.net



Fri, 15 Apr 2005 15:10:52 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Dblist doesn't seem to work correct

2. GoScript fonts seem to have an unknown format...

3. Getting a window the correct size

4. Check user entry of the correct date format

5. 'Canned' data in VB program

6. Inet ftp GET does't return correct file format

7. define a measurement doesn't seem to work

8. Can't seem to create an object.

9. location.replace doesn't seem to work

10. Can't seem to make server-side VBScript work

11. comparisons between decimal and hex values doesn't seem to work

12. response.expires doesn't seem to work!

 

 
Powered by phpBB® Forum Software