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

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

Event Reciever updates status bar and notifications

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :SharePoint
I have a event listener running on a list, with several possible conditions.  I want to use the status bar to update the user as a case happens.  I thought, that since the code is a event reciever/listener, that this would be considered server side code, and to make something appear on the status bar, I can use the SPPageStatusSetter.AddStatus method to show the message.  Yet, when I put in the method parameters, nothign  happens. (I did a statusbar= new SPpageStatusSetter(), statusbar.AddStatus("caller", "messgae", Yellow)) What am I missing?  Is this not considered server-side code, and I should use the other mechanism to set the status bar?  or? thanks rsRocky Sanders

View Complete Post

More Related Resource Links

SharePoint 2010 Content/Event Reciever Deployment


I am currently working on a SharePoint 2010 project which consists of a Site Template and a WSP solution containing Event Recievers and Custom Actions.

what is the best practice for deploying these. In the feature activated event I have bound the the event reciever to a Specific List.

should the WSP solution be deployed before the SiteTemplate or the other way around?

Please Help????  


SharePoint 2010 Content/Event Reciever Deployment


I am currently working on a SharePoint 2010 project which consists of a Site Template and a WSP solution containing Event Recievers and Custom Actions.

what is the best practice for deploying these. In the feature activated event I have bound the the event reciever to a Specific List.

should the WSP solution be deployed before the SiteTemplate or the other way around?

Please Help????  


Capturing status changed event in Task List


I currently have a custom workflow which was designed using SharePoint Designer 2007 that is attached to a document library.  As part of the workflow, a task is created in a Task List.  However, when the status of the Task in the Task List has changed, I have not been able to capture that event from within my SharePoint Designer workflow in order to continue with other actions within the workflow. 

Is there something that I need to do in order to be able to handle the status changed event in the Task which was initially triggered and created by my Document Library workflow?


how do I bind a event reciever to a content type in sp 2010?

All the examples that I have seen also create the content type in visual studio.  I am trying to do this to a content type that already exists.  I created an event receiver and created a feature.  I am not sure where to go from here.

How can i get the status of a task when fire the event onTaskChanged?



I am doing a workflow for sharepoint. I want to now, How can i get the status of a task when fire the event onTaskChanged?

I am  doing an example of the book "Inside Microsoft Windows SharePoint Services" but the folowing code doesn't run.

private void onTaskChanged1_Invoked(object sender, ExternalDataEventArgs e)
TaskStatus = taskAfterProperties.ExtendedProperties[TaskStatusFieldId].ToString();
if (TaskStatus.Equals("Completed")) {
// update variable to break out of while loop
TaskNotCompleted = false;
// generate info for history list entry
HistoryDescription = "Task updated";
HistoryOutcome = "Task status: " + TaskStatus;

I don't now what is TaskStatusFieldId.
Thank you

Radio Button Event

Here I have explained the events of radio button with javascript.
Let me explain the scenarion first,
We are having two radio button say radioobtn1 and radiobtn2. If I click on the button 1 then I need to show one DIVor FORM. same as when I click on radiobtn 2. I have given the code for the above scenarion.

how to impose javascript event processing?


If I have some form control like textbox and I want the event handler to be located in the html instead of at the server side, how to do that? Of course I can copy paste javascript code in the aspx file. But is it possible to do that using some object oriented approach (ie programmatically in the code behind)?


Formview LinqData source not allowing updates


OK, I'm confused.  I've set up a formview with a Linqdata source to allow users to edit records.  When I run it, edit data and submit, it blows up and tells me "Linq datasource6  does not support the Select property when the Delete, Insert or Update operations are enabled."  I googled that warning and saw a couple of posts on this forum saying the problem is the slect statement has to be removed from the Linq data source for it to allow updates. 

But if I remove the select statement then how do I show the user specific info on pageload?   plus I thought the two way databind was an advantge of the datasource control.




Dropdown Event (Template Field)



I have grid view control that includes a dropdown control in a template field.

I wish to execute some code when the value is changed in the dropdown list.  Can't figure out how to capture this event though?

Any suggestions?

Event ID 1011 - DefaultAppPool World Wid Web Pub. Serv. fatal communication error

We have a Windows 2003 server running IIS6 1.1 Framework. We have also installed a DNS and Active Directory in the same machine.

We're randomly getting the error you can see below. Sometimes it causes the recycling of process w3wp.exe (which on my understanding represents the application pool worker processd) and other times results on this process hanging and not responding to any request. To do iisrest temporarly solves the problem.

We were pointed to a possible permissions problem between the user we were runnig the DefaultAppPool with and registry entries used by the iis. We noticed the default predifined user we used, Network Service, wasn't found in the Active Directory, so we changed it by the default configurable user, IWAM_MACHINE_NAME, which is under the IIS_WPG Active Directory Grupo, which, in theory has the correct permissions to run the application pool.

Well, none of this worked and we are still getting this error.

This is driving us crazy and think the problem might have to do with having the Domain Controller/Active Directory and the IIS6 running on the same machine. We'll try now uninstalling this DC pointing to another one to see what happens.

Any help would be appreciated.

Thanks in advance,


Event Type: Warning

Event not raised while parsing xml file



In Visual Studio 2010 ASP.NET 4.0

I want to write a procedure to validate a xml file with a xsd. I found some examples on the web but the one i chose does not work as attended. The example uses XmlReader with a XmlReaderSettings and a ValidationEventHandler.

Here is the code

Protected Sub VerifyDes(ByVal filename As String)

        Dim xslDes As XmlReaderSettings = New XmlReaderSettings()
        xslDes.Schemas.Add("", "http://www.mysite.com/xsd/ValidData.xml")
        xslDes.ValidationType = ValidationType.Schema
        xslDes.ValidationFlags = XmlSchemaValidationFlags.ReportValidationWarnings

        AddHandler xslDes.ValidationEventHandler, AddressOf xslDesValidationEventHandler

        Dim des As XmlReader = XmlReader.Create(filename, xslDes)

        While (des.Read())

        End While

    End Sub

    Protected Sub xslDesValidationEventHandler(ByVal sender As Object, ByVal e As ValidationEventArgs)

        'some code here
    End Sub

I tested this procedure with a xml file which was well formed but contained some elements which were not conform to the xsd.

No event or error occured. It said the file was valid.

Then i tested with a badly formed file. A XmlException was raised but nothing happened with the ValidationEventHandler.

It seems lik

How to set up microsoft application blocks 4.0 to talk to event viewer


I need to set up the microsoft application blocks 4.0 on the server and connect it to my web project.  I need to set it up so that all the errors are logged in the event viewer.  So far I have found out how to set up a flat file listener and send the error to a log file but, not to the event viewer.  Any suggestions would be helpful.

    Composite control: How to bubble a textbox's TextChanged event?


    I've created a composite control that contains several controls, including a textbox. I'm trying to expose the TextChanged event of the textbox as an event on the composite control. I understand that events can be bubbled up the control hierarchy and handled at a higher level, which I've attempted to do, but I can't get the bubbled event to fire. When I drop the control on an aspx I can see the TextChanged event, I can subscribe to the event, but nothing ever happens. Any suggestions? Here is what I think is the relevant code:

    // My event
    private static readonly object EventTextChanged = new object();

    //Handle the bubbled event
    EventHandler textChangedHandler = (EventHandler)Events[EventTextChanged];
    protected override bool OnBubbleEvent(object source, EventArgs e) 
        bool handled = false;

    Reporting services in 2008 r2 how to get a report in a print button click event in my c#.net page


    how to  get a report in my c#.net page button lick event also steps to call a report from asp.net to reporting services


    Thanks in advance

    Creating Event Handler in Code behind


    Hi, so I have a control that is created in the code behind and generates fine but I can't figure out how to create an event handler for it.  I've found plenty of examples for it in C sharp, but none of them seem to apply to VB.  What I want to do is essentially this:

    myDropDownList.SelectedIndexChanged = "Event to do here"

    but it doesn't seem to work for me.

    Any suggestions are appreciated.

    Subscribing to .Net event from COM



    Can somebody tell me how to subscribe to .net event from the COM through interoperability?

    namespace EventSource
        public interface IBugEvents
            void Hungry();
            void Found(string item);
        public class Bug
            public delegate void HungryEventHandler();
            public delegate void FoundEventHandler(string item);
            public event HungryEventHandler Hungry;
            public event FoundEventHandler Found;

    Can somebody tell me how to Subscribe to the Hungry and Found events from the COM?If possible help me with COM Code.

    Event Tracing For Windows: Core Instrumentation Events in Windows 7, Part 2


    In Part 2, the authors cover core OS Event Tracing for Windows (ETW) events as well as present simple scripts to demonstrate a few basic accounting techniques on some of the OS events introduced.

    Alex Bendetov, Insung Park

    MSDN Magazine October 2009

    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