The problem is with your code...it should be showing 1 (and it is on my
computer)...Wha t value is being passed into the Show() call? What is
blnShow = true? a field declaration? are you just telling us that you are
sure it's true?
Show(false) ' displays 2
Show(true) ' displays 1
if you are doing Show(false) but have a field named blnShow that you are
setting to true, such as :
private blnShow as boolean = true
public sub Page_Load()
Show(false)
end sub
Sub Show(Byval blnShow as boolean)
...
end sub
the local blnShow variable you are declaring in the Show function overrides
the more global blnShow field declared at the top. In other words, you
might be getting confused because you have two variables named the same
thing (bad) at different scopes and it isn't the one you are expecting.
karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
<kl******@hotma il.com> wrote in message
news:11******** *************@f 14g2000cwb.goog legroups.com...
Here is what I'm doing
blnShow = true
Sub Show (ByVal blnShow As Boolean)
txtlastname1.vi sible = blnShow
if txtlastname1.vi sible = true then
response.write( "1")
else
response.write( "2")
end if
2 comes up. Why?