• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 413
  • Last Modified:

Variable from Code Behind, being used on Web Form Page (VB ASP.NET)

I have a variable that in the Page_Load event of my code behind page is being used.  When the Page_Load event is over and the page loads, I need that variable to be in a link that is currently setup.  It is not a button or asp hyperlink of any sort.  The link is acutally in a part of an area map.  I just need to be able to send through the one variable when the user clicks on that image (part of the map).  Regular ASP tags are not working and I think my syntax is wrong.


How do I get my Form page to recongize that variable from my code behind?

Thanks in advance,
1 Solution
in the codebehind, declare your variable outside o f any sub/function and make sure it isa public var...

partial class webform1
inherits system.web.ui.page
public ID as integer
sub page_load...
ID =3
end sub
tgidirectAuthor Commented:
Thank you.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now