How to Execute Code Behind Code in Inline aspx

Discussion in 'ASP .Net' started by Kamal Ahmed, Oct 25, 2005.

  1. Kamal Ahmed

    Kamal Ahmed Guest

    Hi All,

    I have an aspx file written using vb.net that contains code both in code
    behind and inline. I want to access variable, object/classes declared in
    code behind into inline .aspx file.
    e.g. following code is written in File Name: Test.aspx.vb

    Imports System.Data
    Dim cCode as String
    cCode = "ABC"

    Now I want to access cCode variable in test.aspx file

    How this is possible ??

    TIA
     
    Kamal Ahmed, Oct 25, 2005
    #1
    1. Advertising

  2. You define server tags similar to the following:
    <%= cCode %>

    HTH

    "Kamal Ahmed" wrote:

    > Hi All,
    >
    > I have an aspx file written using vb.net that contains code both in code
    > behind and inline. I want to access variable, object/classes declared in
    > code behind into inline .aspx file.
    > e.g. following code is written in File Name: Test.aspx.vb
    >
    > Imports System.Data
    > Dim cCode as String
    > cCode = "ABC"
    >
    > Now I want to access cCode variable in test.aspx file
    >
    > How this is possible ??
    >
    > TIA
    >
    >
    >
     
    =?Utf-8?B?U2VyZ2V5IFBvYmVyZXpvdnNraXk=?=, Oct 25, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mitch A

    inline code VS page behind code

    Mitch A, Nov 1, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    3,510
    Chris R. Timmons
    Nov 2, 2003
  2. Paolo Pignatelli
    Replies:
    6
    Views:
    2,236
    Paolo Pignatelli
    Feb 21, 2005
  3. Anders M

    Using inline-code with code behind.

    Anders M, Apr 28, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    7,538
    Karl Seguin
    Apr 28, 2005
  4. Replies:
    8
    Views:
    739
    Kevin Spencer
    Dec 9, 2005
  5. Savas Ates
    Replies:
    1
    Views:
    307
    Patrice
    Aug 17, 2004
Loading...

Share This Page