1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

head and body variables

Discussion in 'C#' started by dolin88, Jul 27, 2008.

  1. #1
    Hi i place this code between my head tags <% int x = 2; %>
    then i put this in the body tags <%= x %>. It gets error. This is frustrating. If i put those two codes between the body tags. It works. What is wrong with asp.net? In php i can place all my codes whereever i want on the page and it works.
    SEMrush
     
    dolin88, Jul 27, 2008 IP
    SEMrush
  2. itcn

    itcn Active Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    68
    #2
    That is very strange; in ASP it doesn't matter where you put the tags. What exactly is the error you are getting?
     
    itcn, Jul 28, 2008 IP