.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Is there any page load events

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :SharePoint
Hi, In C# programming, we have a page load event, which is fired, when the page is getting loaded. In the Page_load event, functions can be written, which can be used when some function needs to be done at the loading of page iteslf. Is there any events like that for  sharepoint coding. I found the ItemAdded and ItemDeleted events, which fires when an item is added or deleted, but when a page is getting loaded, to which event the code has to be written. Everytime the page is loaded, i want to execute a function. To which event handler, the code should be attached. I am using the Class Library project, under C#. Thank you  

View Complete Post

More Related Resource Links

jquery and javascript page load events and functions


Hello friends,

m studying the jquery and js these days, i notice lot of the functions that triggerd the js and jquery at page load.....

like some exampoles are.......

1. jQuery(function($){});

2. <body onload="initialize();>

3. $(document).ready(function(){});

4. function pageLoad(){}

5. and many more....

my question is that many of the functions inside that are not work at another type of page load trigger function....

and some of the page load event also makes conflict with each other.......

so i need to know is that what is the mean of all that event when they use?

thanks and regards

inderjeet singh khalsa

Open ModalPopup dialog on page load


Is there a way to make a modal popup panel active on page load so that the user can't do anything until they deal with the popup dialog?

JQuery Treeview plugin is not working with Ajax page load in ie8


Hi there,

I developed a page where i m using jquery treeview plugin to generate tree. It worked fine on FF, IE8 with out ajax.

But when my page loads thro' ajax call in IE8, it is not collapsing or expanding tree.

Any idea?

Thanks in advance.

Slow page load during a list query one time during the day


We have a monitoring tool set to check to see if the home pages for our 3 web apps load in under 60 seconds every 10 minutes.  All 3 web apps load in under 3 seconds on every 10 minute check except for one exception.  One check every day one of the web app's home page takes longer than 60 seconds to load.  This happens at 11:45PM when there is very little user usage on the environment.  The characteristics of this page are as follows: The only thing on the page is a list view web part which was added by the browser.  The page has not been customized with SPD or code at all.  The list that it pulls is a simple links list that has 281 items on it.  The view pulls all 281 items and displays them in sets of 100.  I cannot find any associated event in the server events and/or SharePoint ULS logs nor are there any daily sharepoint timer jobs running at that time.  Our full index happens at midnight with incremental happening hourly.  Our enviroment is 2 WFEs, 1 App/indexer and we have a separate SQL cluster backend.  

Could someone lead me possibly in the direction I should take next in my troubleshooting?   

external content not load in page like style and js in asp.net mvc when i use area


i am working on a asp.net mvc 2 website who have a area and i have a problem with them.

i use different different url routing for application settings. i have two folder called style

first folder location in main directory  /Style/style.css

second folder location in Area area/style/style.css

everything is work fine in application but when i used style.css from main directory in my area's views then style not worked. when i track them from firebug then i got error "The resource could not be found" but path is correct.

sombody tell me to use absolute path to solve this issue. how i can use absolute path to declare resource url in views.

any suggestion , sollution on this issue who can help me to solve this issue.

page load timeouts and http 500 on MOSS2007


Hi All

I'm hoping someone can point me in the right direction re troubleshooting. We have a MOSS server farm - 3 WFE 1 APP 1 SQL cluster. All Server 2008 sp1 x64. We see occasional http timeouts (HttpException (0x80004005): Request timed out) with associated http 500 error. I have enabled failed request tracing and can see the following:

SiteId 754431215
AppPoolId SharePoint - intranet.*********.com80
ConnId 1610966466
RawConnId 0
RequestURL http://intranet.*********.com:80/Pages/default.aspx
RequestVerb GET

and then later in the trace:

ModuleName IsapiModule
Notification 128
HttpStatus 500
HttpReason Internal Server Error
HttpSubStatus 0
ErrorCode 0
ErrorCode The operation completed successfully. (0x0)

The problem happens on other pages too but the rest of the time the page is returned in less than 5 seconds. The server app logs and sharepoint ULS logs do not give any more detailed info. What I want to know is what other troubleshooting step can I take for http500 errors.

In the past on 32bit environments I have used de

Pop Up window on the load of the page in MVC



        I need an urgent help, when the page is loaded in the explorer, my code will hit the DB and if it fetches a record then I have to throw a pop up window when it loads the page. 

I have no idea on implementing this MVC. 

Can anyone help with this.

Kindly reply ASAP.


How to avoid viewstate in page load event??

Hello Everyone, Here Is my scenario,I haveMaster Page -> ASPX page -> User ControlUser control page is contains all dynamic bind controls (e.g Repeater) depended on ASPX Page (Only one parameter say ItemNo) The problem is, if I bound user control on page load event with passing respective parameters then it's create to much view state (I checked source file and it's almost 1.5 MB) In other way if I put one textbox, and a command button and I pass required parameter on button click and load the control then page size is ok (I checked and it's  < 500KB) So is it any way I can reduce my page/state size??

Load content to the page with in XML?

I'd like to find out about the best technique to generate multiple container boxes/thumbnails of the content with xml that are loaded into wrap panel. It can be stackpanels or listboxes with textblocks and checkboxes in them. Any sample or helpful source of information is highly appreciated. Thank you in advance.

Is there a function in Jquery which run only one time no matter load page or PostBack

In asp.net, I can use Method A to run somethings A one time, and somethings A will nor run when page is postback but In JQuery, I hope to run something B one time when the page is loaded, but if I use Method B, the "Somethings B" always run even the page is pastBack, how can I do? Thanks! ------------------Method A------------protected void Page_Load(object sender, EventArgs e){    if (!IsPostBack)    {       //Do Somethings A    } }   ------------------Method B------------$(document).ready(function () {   //Do Somethings B})

Open lightbox on page load

Hi,please see below code for open lightbox<div id="dialog2"></div><a name="ancBook" href="#dialog2" >Test</a>on click on "Test" link a lightbox open. Now I want the same thing on page load depend on my condition that I am checking on page load.this lightbox open using JQuery.RegardsReetesh

Code inside page load is not executing.

  I am beginner to .Net development, so i am looking for a favour. Thanks a lot in advance!!!!!!! Question 1 :  protected void Page_Load(object sender, EventArgs e)    {        txtUserName.Text = "Focus";                txtUserName.Focus();            } I am unable to get focus to my textbox   Question 2 : I made javascript code for client side validation. function loginjs()        {            if(document.getElementById('txtUserName').value.length==0)            alert("UserName cannot be blank");            else if(document.getElementById('txtPassword').value.length==0)            alert("Password cannot be blank");                    } this code executes but it is not stopping further code execution. I mean it is only alerts but in addition to that i need to stop further execution.     &nbs

Accessing controls / events on a master page from child page

I have a problem i am trying to work out the best method with my limited skills. Im using vb.net ( VS 2010  ) I am using a dll for an IFrame , which is call from code behind.  On my site I havea masterpage which has two gridviews. ( GrdViewWebBureau is the one i am using for this  query)  GrdViewWebBureau is contained within an update panel and updated on a timer control trigger. GrdViewWebBureau updates the page with file counts and status from our clients. I can click on any one of the cells and the code behind is fired. What I am trying to do is put an IFrame on the master page and every time a user clicks on the grid, the Iframe is fired up.  I have tested the iframe and vb code behind from a dummy page and it works, however when the Iframe is on the master page it doeant work.  What I am tryingh to achieve is that no matter what page a user is on the site, they will be able to click on the GrdViewWebBureau and the iframe will fire with the correct childpage. Each webPage may also have an Iframe as well, so i dont know if it is possible to make the IFrame global and just call that control ??  I have no idea if 1 this is possible with the code i have and 2, if i have the brains to understand the who what why and when. Please can you look at my code and pass anyt suggestions / help /  solutions. Master Pa

How to launch or load a page after log in from vb codebehind using visual web developer xprs 2010

 Ok, and hello to every one reading this; what I reakon should be a simple question for one of you code gurus out there. ok here is my code VB snippet that I pasted from my web app, and sorry if this is the wrong forum . anyway here goes, Partial Class login    Inherits System.Web.UI.Page    Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate        Try            If (Login1.UserName = "user1") And (Login1.Password = "password*") Then                MsgBox("Success")                 'need line of code here to launch main.aspx            else                MsgBox("Login Failed")            End If        Catch ex As Exception        End Try            End SubEnd Cl

How to keep custom web part collapsed on page load

Hi, I have developed one custom web part and successfully deployed it on MOSS site. Now the requirement is that the custom web part should be collapse mode by default. how to do this? Which property need to set and where? Please suggest.

Automatically inserting server-side page events into C# when using code separation

I know this is a really basic question and I have spent the last half hour trying to find an answer so please forgive me if this has been asked before (it probably has)....When I create a web page with the C# code placed in a separate file I can't seem to easily add page events (apart from Page_Load). When I open the C# class code for the page all I see in the two drop-down boxes above the code is "Default" (with no other options in the drop-down) in the left-hand box and "ApplicationInstance,form1,Page_Load(object sender,EventArgs e),Profile" in the right hand box. I can't see a way to create the code for the other page events from either of these drop-downs.If I keep the C# code in the same file (i.e., not use code separation) everything works fine - I see "Server Objects & Events, Page, Form1, etc..." in the left hand drop-down and I can create new events in the right drop-down when either Page or Form1 are selected in the left box.Am I missing something really obvious?Many thanks for any suggestions

Replacing HTML tag on Page Load

Hi,I have  a css menu on a master page:<ul> <li id="mb_home" runat=server><a href="default.aspx">Home</a></li> <li id="mb_cars" runat=server><a href="terms.aspx">Cars</a></li> <li id="mb_faq" runat=server><a href="terms.aspx">FAQ</a></li> </ul>what i am trying to achieve is that. when any of the links is clicked. the <a href> tags are replaced by <span> tags. Is this possible? i tried playing aroung with HtmlGenericControl class but i could not solve it.Any advice will be appreciated.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend