Solved

Run code on page load on a VB .aspx file

Posted on 2008-06-11
1
192 Views
Last Modified: 2013-11-05
Hi,

Sorry for the lame question, but I usually don't work in VB and I couldn't find anything satisfactory on Google.

How do I, in as VB .aspx file execute a piece of code on page load.
Something like in C#:

void Page_Load() {

 code here

}
 
I'm using Visual Studio 2008.

Any help would be appreciated.

Warm Regards,
Mário Gamito
0
Comment
Question by:angelsofgrace2006
1 Comment
 
LVL 48

Accepted Solution

by:
jpaulino earned 125 total points
ID: 21757827
You can use the page load event of the aspx page.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
   ' your code
End Sub

Open in new window

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question