Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to Execute Code Behind Code in Inline aspx

Reply
Thread Tools

How to Execute Code Behind Code in Inline aspx

 
 
Kamal Ahmed
Guest
Posts: n/a
 
      10-25-2005
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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?U2VyZ2V5IFBvYmVyZXpvdnNraXk=?=
Guest
Posts: n/a
 
      10-25-2005
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
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why I prefer inline code to code-behind neilmcguigan@gmail.com ASP .Net 8 12-09-2005 03:15 PM
Using inline-code with code behind. Anders M ASP .Net 6 04-28-2005 02:47 PM
How to bring aspx code (in HTML view) to the aspx.vb code-behind? Paolo Pignatelli ASP .Net 6 02-21-2005 01:55 AM
Can i execute aspx file in my asp pag with server.execute method(sorry) Savas Ates ASP General 1 08-17-2004 04:52 PM
inline code VS page behind code Mitch A ASP .Net 3 11-02-2003 12:55 AM



Advertisments