473,396 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Variable displays at one part while does not in another part in a

Hi,
I got a asp page where a variable BudgetTotal is calculated as below:

BudgetTotal = (rstemp.Fields("FedBudget") + rstemp.Fields("StateBudget") +
rstemp.Fields("LocalBudget"))

Initially, when I check this variable value, it displays according to
the following command.
Response.Write "Total Budget" & "<br>"
Response.Write BudgetTotal & "<br>"
Response.Write "End" & "<br>"
However, this variable when used as a part of a table, does not display the
value. No idea why that would be.
The following is part of the code where the variable is used in a table:
Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" & FormatCurrency(BudgetTotal)
& "</TD>" & vbCRLF

Any help is appreciated in advance. Thanks.
Jul 22 '05 #1
8 1283
Jack wrote:
Hi,
I got a asp page where a variable BudgetTotal is calculated as below:

BudgetTotal = (rstemp.Fields("FedBudget") +
rstemp.Fields("StateBudget") + rstemp.Fields("LocalBudget"))

Initially, when I check this variable value, it displays according to
the following command.
Response.Write "Total Budget" & "<br>"
Response.Write BudgetTotal & "<br>"
Response.Write "End" & "<br>"
However, this variable when used as a part of a table, does not
display the value. No idea why that would be.
The following is part of the code where the variable is used in a
table: Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" &
FormatCurrency(BudgetTotal) & "</TD>" & vbCRLF

Any help is appreciated in advance. Thanks.


Sorry, we're not clairvoyant. Create a small test page that demonstrates
this problem and show the code to us (perhaps the exercise of creating the
small page will help you spot the problem yourself).

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 22 '05 #2
What do you see in the column tag if you "view source" on the page.

--
--Mark Schupp
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:5C**********************************@microsof t.com...
Hi,
I got a asp page where a variable BudgetTotal is calculated as below:

BudgetTotal = (rstemp.Fields("FedBudget") + rstemp.Fields("StateBudget") +
rstemp.Fields("LocalBudget"))

Initially, when I check this variable value, it displays according to
the following command.
Response.Write "Total Budget" & "<br>"
Response.Write BudgetTotal & "<br>"
Response.Write "End" & "<br>"
However, this variable when used as a part of a table, does not display
the
value. No idea why that would be.
The following is part of the code where the variable is used in a table:
Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" &
FormatCurrency(BudgetTotal)
& "</TD>" & vbCRLF

Any help is appreciated in advance. Thanks.

Jul 22 '05 #3
Thanks Mark and Bob for your respective advise.

Here is the view source output for the budget line, Mark:
<TD WIDTH='1%' >&nbsp</TD><TD WIDTH='1%' >&nbsp</TD><TD WIDTH='1%'
&nbsp</TD><TD WIDTH='1%' >&nbsp</TD><TD WIDTH='10%' ALIGN=RIGHT><B>BUDGET:</B></TD><TD ALIGN=RIGHT WIDTH='10%' >$0.00</TD>
The above stillshows the BUDGET as $0.00. Any further thoughts. Regards.
"Mark Schupp" wrote:
What do you see in the column tag if you "view source" on the page.

--
--Mark Schupp
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:5C**********************************@microsof t.com...
Hi,
I got a asp page where a variable BudgetTotal is calculated as below:

BudgetTotal = (rstemp.Fields("FedBudget") + rstemp.Fields("StateBudget") +
rstemp.Fields("LocalBudget"))

Initially, when I check this variable value, it displays according to
the following command.
Response.Write "Total Budget" & "<br>"
Response.Write BudgetTotal & "<br>"
Response.Write "End" & "<br>"
However, this variable when used as a part of a table, does not display
the
value. No idea why that would be.
The following is part of the code where the variable is used in a table:
Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" &
FormatCurrency(BudgetTotal)
& "</TD>" & vbCRLF

Any help is appreciated in advance. Thanks.


Jul 22 '05 #4
Bob,
I am going to work on creating a small test page to see if I can find out
where the problem is. In case I still have no clue, I will further post. In
any event I appreciate your advise. Regards.

"Bob Barrows [MVP]" wrote:
Jack wrote:
Hi,
I got a asp page where a variable BudgetTotal is calculated as below:

BudgetTotal = (rstemp.Fields("FedBudget") +
rstemp.Fields("StateBudget") + rstemp.Fields("LocalBudget"))

Initially, when I check this variable value, it displays according to
the following command.
Response.Write "Total Budget" & "<br>"
Response.Write BudgetTotal & "<br>"
Response.Write "End" & "<br>"
However, this variable when used as a part of a table, does not
display the value. No idea why that would be.
The following is part of the code where the variable is used in a
table: Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" &
FormatCurrency(BudgetTotal) & "</TD>" & vbCRLF

Any help is appreciated in advance. Thanks.


Sorry, we're not clairvoyant. Create a small test page that demonstrates
this problem and show the code to us (perhaps the exercise of creating the
small page will help you spot the problem yourself).

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Jul 22 '05 #5
I think you will need to look at all of the code between the point where you
can get the value and where you cannot.

Gradually move your debugging display code down the page until it no longer
shows the expected value.

Also:

Does it display if it is not formatted using FormatCurrency?
Do you have "implicit none" at the top of the page?

--
Mark Schupp

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:52**********************************@microsof t.com...
Thanks Mark and Bob for your respective advise.

Here is the view source output for the budget line, Mark:
<TD WIDTH='1%' >&nbsp</TD><TD WIDTH='1%' >&nbsp</TD><TD WIDTH='1%'
&nbsp</TD><TD WIDTH='1%' >&nbsp</TD><TD WIDTH='10%'

ALIGN=RIGHT><B>BUDGET:</B></TD><TD ALIGN=RIGHT WIDTH='10%' >$0.00</TD>
The above stillshows the BUDGET as $0.00. Any further thoughts. Regards.
"Mark Schupp" wrote:
What do you see in the column tag if you "view source" on the page.

--
--Mark Schupp
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:5C**********************************@microsof t.com...
Hi,
I got a asp page where a variable BudgetTotal is calculated as below:

BudgetTotal = (rstemp.Fields("FedBudget") + rstemp.Fields("StateBudget") + rstemp.Fields("LocalBudget"))

Initially, when I check this variable value, it displays according to
the following command.
Response.Write "Total Budget" & "<br>"
Response.Write BudgetTotal & "<br>"
Response.Write "End" & "<br>"
However, this variable when used as a part of a table, does not display the
value. No idea why that would be.
The following is part of the code where the variable is used in a table: Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" &
FormatCurrency(BudgetTotal)
& "</TD>" & vbCRLF

Any help is appreciated in advance. Thanks.


Jul 22 '05 #6
"Mark Schupp" <no****@nospam.com> wrote in message
news:u1**************@TK2MSFTNGP09.phx.gbl...
I think you will need to look at all of the code between the point where you can get the value and where you cannot.

Gradually move your debugging display code down the page until it no longer shows the expected value.

Also:

Does it display if it is not formatted using FormatCurrency?
Do you have "implicit none" at the top of the page?

--
Mark Schupp


[snip]

Do you mean "Option Explicit"?

I've never heard of "implicit none".
Jul 22 '05 #7
You're right. "Option Explicit" is what I meant.

"implicit none" is from Fortran (that was a looooong time ago for me).
memory is a strange thing sometimes.

--
Mark Schupp

"McKirahan" <Ne**@McKirahan.com> wrote in message
news:VY********************@comcast.com...
"Mark Schupp" <no****@nospam.com> wrote in message
news:u1**************@TK2MSFTNGP09.phx.gbl...
I think you will need to look at all of the code between the point where

you
can get the value and where you cannot.

Gradually move your debugging display code down the page until it no

longer
shows the expected value.

Also:

Does it display if it is not formatted using FormatCurrency?
Do you have "implicit none" at the top of the page?

--
Mark Schupp


[snip]

Do you mean "Option Explicit"?

I've never heard of "implicit none".

Jul 22 '05 #8
Thanks Mark for following up with this issue. I actually checked the value of
FormatCurrency(BudgetTotal) and it too gives me the correct value when I do a
response.write on the above. I will follow your and Bob's advise and see if I
could resolve this problem. Sorry for the late response. Had to handle other
IT issues. Regards.

"Mark Schupp" wrote:
You're right. "Option Explicit" is what I meant.

"implicit none" is from Fortran (that was a looooong time ago for me).
memory is a strange thing sometimes.

--
Mark Schupp

"McKirahan" <Ne**@McKirahan.com> wrote in message
news:VY********************@comcast.com...
"Mark Schupp" <no****@nospam.com> wrote in message
news:u1**************@TK2MSFTNGP09.phx.gbl...
I think you will need to look at all of the code between the point where

you
can get the value and where you cannot.

Gradually move your debugging display code down the page until it no

longer
shows the expected value.

Also:

Does it display if it is not formatted using FormatCurrency?
Do you have "implicit none" at the top of the page?

--
Mark Schupp


[snip]

Do you mean "Option Explicit"?

I've never heard of "implicit none".


Jul 22 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Ken | last post by:
What am I doing wrong? I set the variable co_name on the first page with an <input.... > and session_start() at the top of both pages. Clicking on a link that takes me to the second page: ...
2
by: Marc | last post by:
Hi all, I was using Tkinter.IntVar() to store values from a large list of parts that I pulled from a list. This is the code to initialize the instances: def initVariables(self): self.e =...
83
by: Alexander Zatvornitskiy | last post by:
Hello All! I'am novice in python, and I find one very bad thing (from my point of view) in language. There is no keyword or syntax to declare variable, like 'var' in Pascal, or special syntax in...
6
by: Al Jones | last post by:
This is a repost form the vbscript newgroup - if this isn't the appropriate group would you point me toward one that is. Basically, I seem to be losing session data part way though preparing an...
0
by: RookieCard | last post by:
I've been stuck on this for 2 days. Here's the deal. I am working (3 levels down/deep)in a subform within a tab object that is within another tab obeject. Everything works great! Except here: 1)...
7
by: TaxicabNumber | last post by:
main() { int num; while(..) { num=atoi(str+x) if(num!=0) { .... ....
17
by: ethan | last post by:
Hi All, How to write a macro with variable length of argument? For example, if i need a macro to check return value of printf. #define PRINTF_ESC(x, ...) if(printf(x, ...) == 10) goto end; ...
9
by: Shapper | last post by:
Hello, I am declaring a variable in my aspx.vb code as follows: Public Class catalogue Public productid As String Private Sub Page_Load ... I have an image button where I call the...
19
by: Hapa | last post by:
Does only reading (never writing) of a variable need thread synchronisation? Thanks for help? PS. Anybody knows a Visual C++ news group?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.