Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Public Variables

Status
Not open for further replies.

sthmpsn1

MIS
Sep 26, 2001
456
US
Is there an easier way to do this. Right now I have several public Variables at the top of my codebehind file which I change the value of the variable in different subs. When I change the values in those variables in a sub they do not appeared changed to my program unless I use Me.dataBind(). Is there a better way to work with these Variables????

Scott
 
That sounds like suspicious behavior... some relevant code, maybe?

-paul
penny1.gif
penny1.gif

The answer to getting answered -- faq855-2992
 
Here is the code I have

Public layerpos As Single = 0

in my sub

layerpos = 400
strPanelName = "panel3"
pnlPanel = FindControl(strPanelName)
pnlPanel.Visible = False
addUser1.Visible = True
addUser2.Visible = False
Me.DataBind()
 
This is how I call the variable on my page

<div id=&quot;Layer4&quot; style=&quot;position:absolute; width:417px; height:115px; z-index:2; left: 32px; top:<%#layerpos%>px;&quot;>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top