I've asked this question before but couldn't get the answer I was looking for so I'm going to try it again.
I'm translating pages from old asp to asp.net and I don't want to do this any other way so I really just want to know if this can be done.
In asp, I'd assign a variable on one page
<% myVar = "something" %>
I could assign many variables here and then use an include
<!--#include file="Test2.aspx"-->
then in test2 file, I could access all the variables without having to pass all the variables into the control or declaring them again, like
<% myVar = "something else" %>
I want to do this the dot net way but I have some thirty variables on the page and i don't want to pass a bunch into the user control and I don't want to have to keep declaring the same variables.
All I really want to know is if there is some way to replicate the behavior above in asp.net?