Code Behind & Variables!

  • Thread starter Thread starter Adam Knight
  • Start date Start date
A

Adam Knight

Hi,



Can I use variables declared in a code behind file in a .aspx file?

If so, what needs to be done to make these variables available?



If I am using a .ascx file instead of an .aspx, does this have any impact?



Responses are appreciated.


Cheers,

Adam
 
As Marina and Brock have answered, yes you can...it's merely an
accessibility issue. The point of my reply is to ask why you want to?
There are certainly cases where you have to, but as a general rule I'd say
it's good to avoid this if possible.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top