   [.net] Sending variables with ASP.NET
  I'm kind of confused with ASP.NET's variable system.Like I'm used to PHP where you just have a $ID = 1; atthe top of the page. Apparently you can't do that with ASP.NET?Or is there somthing I'm missing?   
  i don't know if i'm getting your question. do  you mean  global variable?public partial class _Default : System.Web.UI.Page {   ///global variable here   protected void Page_Load(object sender, EventArgs e)    { //code    }};  No I know how to do that, I meant like let's say you have an imgPreview.aspx.That page loads the SQL data by it's imgID. So in PHP you would have a lineat the top of a page declaring: $ID; that way people could put in their browser: imgPreview.php?ID=1. I'm trying to do the same thing with ASP.NET.Any ideas?   ;Do you mean int id = (int)Request.QueryString["ID"];In your Page_Load event, you can retrieve your query string and load your image by id. Be sure to check wether your query string actually exists (!= null), otherwise it will crash.With asp.net, you don't have any server side code within your page anymore. Instead, you have a imgPreview.aspx.cs code behind file, where you put your code.Hope this helps,Edo   ;  May I add that using register globals in PHP is universally seen as a bad idea.   