Variable Scope

L

Leon

In asp.net, the variable can be defined embeded within page itself
such as <% dim ID %> and used within page by put it into <%= %>.
Also, variable can be defned and used in behind code. Could you tell
me what different of this two type of location variable ? can I one
define only location but use it for two? For example, define it within
behind code.


Thank you very much
 
R

Ravikanth[MVP]

Hi

Yes. You can use variables declared in code behind in asp
page directly

If you have public variable in code behind, you can
directly use that variable inside aspx page <%=<<public
variable name>>%>

HTH

Ravikanth[MVP]
 

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

Members online

Forum statistics

Threads
474,075
Messages
2,570,562
Members
47,198
Latest member
MariD92844

Latest Threads

Top