473,378 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Error with Page_Load

I have a Page load in my code:-
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Doing Something here
End Sub

And i want to call it by typing in "page_load()"[Code below] at the end of
my page but
its giving me the error:-" Argument not specified for parameter 'e' of
'Private Sub Page_Load(sender As Object, e As System.EventArgs)'. AND
Argument not specified for parameter 'sender' of 'Private Sub
Page_Load(sender As Object, e As System.EventArgs)'.
Any help?
--------------------------------------------
If Command = "Add" Or Command = "Delete" Then
ViewState("Updated") = True
Page_Load()
End If
Nov 18 '05 #1
1 1586
Hi,

Try

Page_Load(Me, EventArgs.Empty)

or better move the code into another method - it's a better design.

Hope this helps
Martin
"Patrick.O.Ige" <Pa*********@discussions.microsoft.com> wrote in message
news:55**********************************@microsof t.com...
I have a Page load in my code:-
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Doing Something here
End Sub

And i want to call it by typing in "page_load()"[Code below] at the end of
my page but
its giving me the error:-" Argument not specified for parameter 'e' of
'Private Sub Page_Load(sender As Object, e As System.EventArgs)'. AND
Argument not specified for parameter 'sender' of 'Private Sub
Page_Load(sender As Object, e As System.EventArgs)'.
Any help?
--------------------------------------------
If Command = "Add" Or Command = "Delete" Then
ViewState("Updated") = True
Page_Load()
End If

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Martine | last post by:
Hi there! I have a problem with programmatically adding user controls to my mobile webforms. If I load my usercontrol programmatically (in the Page_Load), the object is instantiated, I have...
0
by: Andrew | last post by:
Can someone out there help. I am using Server. Transfer from a user control to a webform and tried to follow many examples exactly as specified but cannot get around the (Specified cast is not...
2
by: Tim Zych | last post by:
A web form in my app is not running anymore. Whenever I try to do an action, I get an error: Server Error in '/codelib' Application....
1
by: Surjeet Gill | last post by:
I was getting the following error after compiling the C# source file with VS.NET 2003, Any help will be appreciated. Many thanks! Surjeet Gill Details: Compilation Error Description: An...
2
by: Gopal Krish | last post by:
Folks, My ASPX page uses a custom user control. What happens here is that when a runtime error occurs in the ASPX page, the error is caught in the error handler and then strangely, the execution...
2
by: James Wallace | last post by:
I hope that someone can help me out there with this problem. I get an itermittant problem with our web page that occurs about once every 10 to 15 days where the only way to fix the problem is to...
13
by: Max | last post by:
Hi There! I'm having a mysterious error right after I login using Forms Authentication in my ASP.NET app. Below is the error... Exception Details: System.NullReferenceException: Object...
4
by: rushikesh.joshi | last post by:
Hi All, I have created my own WebControl and want to add it in my aspx page at runtime. it's compiling perfectly, but when i m going to execute, it gives me error of "Object reference not set...
17
by: Arpan | last post by:
When a Button is clicked in a Web Form in an ASPX page, the Form will post back to itself. Under such circumstances (i.e. when a Button is clicked), will the Page_Load sub execute first & then will...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.