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.
    dolin88, Jul 27, 2008 IP
  2. itcn

    itcn Active Member

    Likes Received:
    Best Answers:
    Trophy Points:
    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