Ask a Question related to ASP Database, Design and Development.
-
Jennifer Smith #1
displaying asp variable stored in db in an asp page
I am modifiying a database driven application. I need to store the
following information and then have it shown in an asp page.
<table width="100%" cellspacing="2" cellpadding="2" border="0">
<tr>
<td>
<span class="Normal">
Meeting:
</span>
</td>
<td colspan="3">
<span class="Normal">
<b><%=strMeetingTitle%></b>
</span>
</td>
</tr>
</table>
When I load the page the section where the table should show is blank.
When I view source I see exactly the same code as above.
So - it is not interpreting the <%=%> as response.write the variable
strMeetingTitle that is set in the page before this database part is
written.
Any ideas on how to get this to work?
Thanks!!!
Jennifer Smith Guest
-
Coldfusion expression stored inside a variable...
I have a Coldfusion expression stored inside a coldfusion variable, for example: <cfsavecontent time = #CreateODBCDateTime(now())#> if i do not... -
Stored Procedure Result Variable
I am having trouble returning variables from my stored procedures. My CFML and SP code is attached. The error is always: Attribute validation... -
HELP : problem with sessions, and php code stored within a variable
I am getting the following error on a peice of code of mine: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or... -
How can I execute code stored in variable
> Something like ***execute()***, but instead of executing shell oops! By execute() I meant exec() or passthru(). It was very late when I... -
can i get the html that a page creates stashed off in a variable to be stored later
You should be able to override the Render method of your page object and get the final output from there. Here's more info:... -
Ray at #2
Re: displaying asp variable stored in db in an asp page
Is this a page with a .ASP extension?
Ray at work
"Jennifer Smith" <jennifer@nospam.com> wrote in message
news:403E69EC.72BC0CA@nospam.com...> I am modifiying a database driven application. I need to store the
> following information and then have it shown in an asp page.
>
> <table width="100%" cellspacing="2" cellpadding="2" border="0">
> <tr>
> <td>
> <span class="Normal">
> Meeting:
> </span>
> </td>
> <td colspan="3">
> <span class="Normal">
> <b><%=strMeetingTitle%></b>
> </span>
> </td>
> </tr>
> </table>
>
> When I load the page the section where the table should show is blank.
> When I view source I see exactly the same code as above.
>
> So - it is not interpreting the <%=%> as response.write the variable
> strMeetingTitle that is set in the page before this database part is
> written.
>
> Any ideas on how to get this to work?
>
> Thanks!!!
>
>
>
>
Ray at Guest
-
Jennifer Smith #3
Re: displaying asp variable stored in db in an asp page
Yes.
"Ray at <%=sLocation%> [MVP]" wrote:
> Is this a page with a .ASP extension?
>
> Ray at work
>
> "Jennifer Smith" <jennifer@nospam.com> wrote in message
> news:403E69EC.72BC0CA@nospam.com...> > I am modifiying a database driven application. I need to store the
> > following information and then have it shown in an asp page.
> >
> > <table width="100%" cellspacing="2" cellpadding="2" border="0">
> > <tr>
> > <td>
> > <span class="Normal">
> > Meeting:
> > </span>
> > </td>
> > <td colspan="3">
> > <span class="Normal">
> > <b><%=strMeetingTitle%></b>
> > </span>
> > </td>
> > </tr>
> > </table>
> >
> > When I load the page the section where the table should show is blank.
> > When I view source I see exactly the same code as above.
> >
> > So - it is not interpreting the <%=%> as response.write the variable
> > strMeetingTitle that is set in the page before this database part is
> > written.
> >
> > Any ideas on how to get this to work?
> >
> > Thanks!!!
> >
> >
> >
> >Jennifer Smith Guest
-
Ray at #4
Re: displaying asp variable stored in db in an asp page
Is it on an IIS server? Tell us about the server.
Ray at work
"Jennifer Smith" <jennifer@nospam.com> wrote in message
news:403E6DA8.A4A02C0A@nospam.com...> Yes.
>
> "Ray at <%=sLocation%> [MVP]" wrote:
>>> > Is this a page with a .ASP extension?
> >
> > Ray at work
> >
> > "Jennifer Smith" <jennifer@nospam.com> wrote in message
> > news:403E69EC.72BC0CA@nospam.com...> > > I am modifiying a database driven application. I need to store the
> > > following information and then have it shown in an asp page.
> > >
> > > <table width="100%" cellspacing="2" cellpadding="2" border="0">
> > > <tr>
> > > <td>
> > > <span class="Normal">
> > > Meeting:
> > > </span>
> > > </td>
> > > <td colspan="3">
> > > <span class="Normal">
> > > <b><%=strMeetingTitle%></b>
> > > </span>
> > > </td>
> > > </tr>
> > > </table>
> > >
> > > When I load the page the section where the table should show is blank.
> > > When I view source I see exactly the same code as above.
> > >
> > > So - it is not interpreting the <%=%> as response.write the variable
> > > strMeetingTitle that is set in the page before this database part is
> > > written.
> > >
> > > Any ideas on how to get this to work?
> > >
> > > Thanks!!!
> > >
> > >
> > >
> > >
Ray at Guest
-
Ray at #5
Re: displaying asp variable stored in db in an asp page
p.s.
In IIS manager, pull up the properties of your site or application. Click
"Configuration" in the Application Settings area. In the Application
Mappings, there should be an entry like:
Extension Executeable Path Verbs
..asp C:\Winnt\System32\inetsrv\asp.dll GET,HEAD,POST,TRACE
This assumes that your %systemroot% is C:\Winnt.
Ray at work
"Jennifer Smith" <jennifer@nospam.com> wrote in message
news:403E6DA8.A4A02C0A@nospam.com...> Yes.
>
> "Ray at <%=sLocation%> [MVP]" wrote:
>>> > Is this a page with a .ASP extension?
> >
> > Ray at work
> >
> > "Jennifer Smith" <jennifer@nospam.com> wrote in message
> > news:403E69EC.72BC0CA@nospam.com...> > > I am modifiying a database driven application. I need to store the
> > > following information and then have it shown in an asp page.
> > >
> > > <table width="100%" cellspacing="2" cellpadding="2" border="0">
> > > <tr>
> > > <td>
> > > <span class="Normal">
> > > Meeting:
> > > </span>
> > > </td>
> > > <td colspan="3">
> > > <span class="Normal">
> > > <b><%=strMeetingTitle%></b>
> > > </span>
> > > </td>
> > > </tr>
> > > </table>
> > >
> > > When I load the page the section where the table should show is blank.
> > > When I view source I see exactly the same code as above.
> > >
> > > So - it is not interpreting the <%=%> as response.write the variable
> > > strMeetingTitle that is set in the page before this database part is
> > > written.
> > >
> > > Any ideas on how to get this to work?
> > >
> > > Thanks!!!
> > >
> > >
> > >
> > >
Ray at Guest
-
Yan-Hong Huang[MSFT] #6
Re: displaying asp variable stored in db in an asp page
Hi Jennifer,
Do you mean that "<%=strMeetingTitle%>" works in Response.Write, however,
it doesn't work in that table?
Thanks.
Best regards,
Yanhong Huang
Microsoft Community Support
Get Secure! ¨C [url]www.microsoft.com/security[/url]
This posting is provided "AS IS" with no warranties, and confers no rights.
Yan-Hong Huang[MSFT] Guest
-
Jennifer Smith #7
Re: displaying asp variable stored in db in an asp page
I hope this will explain it better.
On my asp page I have a database query where retrieve values. One of the
fields is called - lets say - header_field
header_field has the the following code:
<table width="100%" cellspacing="2" cellpadding="2" border="0">
<tr>
<td>
<span class="Normal">
Meeting:
</span>
</td>
<td colspan="3">
<span class="Normal">
<b><%=strMeetingTitle%></b>
</span>
</td>
</tr>
</table>
When the database field - rs("header_field") is written to the page - it shows
the table as is, and the <%=%> is not taken as an asp variable.
Hope that explains better :)
"Yan-Hong Huang[MSFT]" wrote:
> Hi Jennifer,
>
> Do you mean that "<%=strMeetingTitle%>" works in Response.Write, however,
> it doesn't work in that table?
>
> Thanks.
>
> Best regards,
> Yanhong Huang
> Microsoft Community Support
>
> Get Secure! ¨C [url]www.microsoft.com/security[/url]
> This posting is provided "AS IS" with no warranties, and confers no rights.Jennifer Smith Guest
-
Ray at #8
Re: displaying asp variable stored in db in an asp page
You see <%=strMeetingTitle%> in a view source? Is that what you're saying?
Did you read and consider my other two posts?
Ray at work
"Jennifer Smith" <jennifer@nospam.com> wrote in message
news:403F621A.C87CEAF8@nospam.com...shows> I hope this will explain it better.
>
> On my asp page I have a database query where retrieve values. One of the
> fields is called - lets say - header_field
>
> header_field has the the following code:
> <table width="100%" cellspacing="2" cellpadding="2" border="0">
> <tr>
> <td>
> <span class="Normal">
> Meeting:
> </span>
> </td>
> <td colspan="3">
> <span class="Normal">
> <b><%=strMeetingTitle%></b>
> </span>
> </td>
> </tr>
> </table>
>
> When the database field - rs("header_field") is written to the page - ithowever,> the table as is, and the <%=%> is not taken as an asp variable.
>
> Hope that explains better :)
>
> "Yan-Hong Huang[MSFT]" wrote:
>> > Hi Jennifer,
> >
> > Do you mean that "<%=strMeetingTitle%>" works in Response.Write,rights.> > it doesn't work in that table?
> >
> > Thanks.
> >
> > Best regards,
> > Yanhong Huang
> > Microsoft Community Support
> >
> > Get Secure! ¨C [url]www.microsoft.com/security[/url]
> > This posting is provided "AS IS" with no warranties, and confers no>
Ray at Guest
-
Jennifer Smith #9
Re: displaying asp variable stored in db in an asp page
Windows2000 using iis5 - and I checked the configuration. It is as you
mentioned in your post.
I think the problem is I am trying to display a variable in a variable :P
And yes I see <%=strMeetingTitle%> in a view source.
"Ray at <%=sLocation%> [MVP]" wrote:
> You see <%=strMeetingTitle%> in a view source? Is that what you're saying?
> Did you read and consider my other two posts?
>
> Ray at work
>
> "Jennifer Smith" <jennifer@nospam.com> wrote in message
> news:403F621A.C87CEAF8@nospam.com...> shows> > I hope this will explain it better.
> >
> > On my asp page I have a database query where retrieve values. One of the
> > fields is called - lets say - header_field
> >
> > header_field has the the following code:
> > <table width="100%" cellspacing="2" cellpadding="2" border="0">
> > <tr>
> > <td>
> > <span class="Normal">
> > Meeting:
> > </span>
> > </td>
> > <td colspan="3">
> > <span class="Normal">
> > <b><%=strMeetingTitle%></b>
> > </span>
> > </td>
> > </tr>
> > </table>
> >
> > When the database field - rs("header_field") is written to the page - it> however,> > the table as is, and the <%=%> is not taken as an asp variable.
> >
> > Hope that explains better :)
> >
> > "Yan-Hong Huang[MSFT]" wrote:
> >> > > Hi Jennifer,
> > >
> > > Do you mean that "<%=strMeetingTitle%>" works in Response.Write,> rights.> > > it doesn't work in that table?
> > >
> > > Thanks.
> > >
> > > Best regards,
> > > Yanhong Huang
> > > Microsoft Community Support
> > >
> > > Get Secure! ¨C [url]www.microsoft.com/security[/url]
> > > This posting is provided "AS IS" with no warranties, and confers no> >Jennifer Smith Guest
-
Ray at #10
Re: displaying asp variable stored in db in an asp page
If you are seeing <%=strMeetingTitle%> in a view source, your page is NOT
being processed by the asp engine. This is why I posted the other things I
posted, asking if you're on an IIS server, if this is an ASP page, if you
have the .asp extension mapped to asp.dll...
Ray at work
"Jennifer Smith" <jennifer@nospam.com> wrote in message
news:403F69D6.4763142B@nospam.com...saying?> Windows2000 using iis5 - and I checked the configuration. It is as you
> mentioned in your post.
>
> I think the problem is I am trying to display a variable in a variable :P
>
> And yes I see <%=strMeetingTitle%> in a view source.
>
> "Ray at <%=sLocation%> [MVP]" wrote:
>> > You see <%=strMeetingTitle%> in a view source? Is that what you'rethe> > Did you read and consider my other two posts?
> >
> > Ray at work
> >
> > "Jennifer Smith" <jennifer@nospam.com> wrote in message
> > news:403F621A.C87CEAF8@nospam.com...> > > I hope this will explain it better.
> > >
> > > On my asp page I have a database query where retrieve values. One ofit> > > fields is called - lets say - header_field
> > >
> > > header_field has the the following code:
> > > <table width="100%" cellspacing="2" cellpadding="2" border="0">
> > > <tr>
> > > <td>
> > > <span class="Normal">
> > > Meeting:
> > > </span>
> > > </td>
> > > <td colspan="3">
> > > <span class="Normal">
> > > <b><%=strMeetingTitle%></b>
> > > </span>
> > > </td>
> > > </tr>
> > > </table>
> > >
> > > When the database field - rs("header_field") is written to the page ->> > shows> > however,> > > the table as is, and the <%=%> is not taken as an asp variable.
> > >
> > > Hope that explains better :)
> > >
> > > "Yan-Hong Huang[MSFT]" wrote:
> > >
> > > > Hi Jennifer,
> > > >
> > > > Do you mean that "<%=strMeetingTitle%>" works in Response.Write,> > rights.> > > > it doesn't work in that table?
> > > >
> > > > Thanks.
> > > >
> > > > Best regards,
> > > > Yanhong Huang
> > > > Microsoft Community Support
> > > >
> > > > Get Secure! ¨C [url]www.microsoft.com/security[/url]
> > > > This posting is provided "AS IS" with no warranties, and confers no> > >
Ray at Guest
-
Yan-Hong Huang[MSFT] #11
Re: displaying asp variable stored in db in an asp page
Hi Jennifer,
I totally agree with Ray here. If ASP engineer works well, it will parse
<%=strMeetingTitle%> correctly in server side and render it to
corresponding HTML in client side. If you still see <%=strMeetingTitle%> in
view->source, that means the variable is not rendered correctly in server
side.
So what we need to do is:
1) Check whether web server supports ASP programming
2) Check whether .ASP file is mapped correctly in web server
Thanks.
Best regards,
Yanhong Huang
Microsoft Community Support
Get Secure! ¨C [url]www.microsoft.com/security[/url]
This posting is provided "AS IS" with no warranties, and confers no rights.
Yan-Hong Huang[MSFT] Guest
-
Stephen Willingham #12
Re: displaying asp variable stored in db in an asp page
Hello Jennifer
Maybe I'm way off base here...
Are you storing vbscript code inside of ASP delimiters as part of a string contained
in the database? I don't think you can Response.Write the string that you return from
the db and expect the asp portions inside the string to execute. Won't the browser
just render the <%=strMeetingTitle%> as text?
Perhaps you could replace <%=strMeetingTitle%> in the database with a token, and then
before writing it to the page do something like
str = Replace(rs("header_field"), "<<token>>", strMeetingTitle))
Response.Write str
--
HTH,
Stephen
"Jennifer Smith" <jennifer@nospam.com> wrote in message
news:403F621A.C87CEAF8@nospam.com...> I hope this will explain it better.
>
> On my asp page I have a database query where retrieve values. One of the
> fields is called - lets say - header_field
>
> header_field has the the following code:
> <table width="100%" cellspacing="2" cellpadding="2" border="0">
> <tr>
> <td>
> <span class="Normal">
> Meeting:
> </span>
> </td>
> <td colspan="3">
> <span class="Normal">
> <b><%=strMeetingTitle%></b>
> </span>
> </td>
> </tr>
> </table>
>
> When the database field - rs("header_field") is written to the page - it shows
> the table as is, and the <%=%> is not taken as an asp variable.
>
> Hope that explains better :)
>
> "Yan-Hong Huang[MSFT]" wrote:
>>> > Hi Jennifer,
> >
> > Do you mean that "<%=strMeetingTitle%>" works in Response.Write, however,
> > it doesn't work in that table?
> >
> > Thanks.
> >
> > Best regards,
> > Yanhong Huang
> > Microsoft Community Support
> >
> > Get Secure! ¨C [url]www.microsoft.com/security[/url]
> > This posting is provided "AS IS" with no warranties, and confers no rights.
Stephen Willingham Guest



Reply With Quote

