echo for a session variable

G

Guest

I'm used to PHP. If I wanted to have a link with variables, I'd do
something like this in the html:
mysite.com/?user=<?php echo $myUser ?>

What's the best way to do this in ASP.NET
1. How do I do an Echo for a Session variable.
2. is it best design to do this in the html <% here %> or in the code behind?

Thanks
 
J

John

Craig said:
I'm used to PHP. If I wanted to have a link with variables, I'd do
something like this in the html:
mysite.com/?user=<?php echo $myUser ?>

What's the best way to do this in ASP.NET
1. How do I do an Echo for a Session variable.


2. is it best design to do this in the html <% here %> or in the code
behind?

It's really a preference thing.

Personally;
-if it's a simple page .. <%=myUser%> might be ok
-anything bigger, I would probably use code behind.
 

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

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top