View Complete Post
I have created an event handler for Site Pages library in SharePoint 2010. In event Handler I have given the list template id (119 - wiki web page library) but the event handler is not working. Do I need to use different list template id for this.?
I have created a webpart that generates a xlsx fil with data from some lists on a sharepoint 2010 site using open xml 2.0.
So far I save the generated xlsx file on the servers harddrive just for test purpose. What I want is to save the generated xlsx file to a document library, but I feel it is a little stupid to save the file on the harddrive and afterwards upload it to the
Can't I skip the "save on harddrive"-step somehow?
I'm trying to move the filein ItemCheckingIn event.. Move succeeds but then client displays an error:
The URL 'Test/asdf.doc' is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.
As a solution, I tried moving file in ItemCheckedIn event, but then client browser renders before the event finishes, so sometimes client browser displays outdated list data (with old item).
I need to move a file (actually I'm trying to rename file with extention - with ListItem["title"] we can't change extention) transparently to the user.
Possible solutions (that I can think of) :
1. Find a way to modify redirect url in ItemCheckingIn event (should be possible, but I don't know how)
2. Delay response until ItemCheckingIn event completes (don't think its possible)
3. Refresh client browser when ItemCheckedIn event (don't think its possible)
I spent so much time on this still could not find a workaroud.
Any ideas will be appreciated!
In a ItemUpdated event on a list i normally i use "properties.ListItem" to get data before the changes, and "properties.AfterProperties" to get data after the chages
But when working with document libraries things get a lot complicated. The ItemAdded handler gets called when a file is uploaded, not when the user specifies it's metadata. To handle these metadata i have to use the ItemUpdated handler.
But even there it happens that "properties.ListItem" and "properties.AfterProperties" result both null, so i cannot access any data i need
Is there a way to get a document metadata when it is added to a library?
I've set up an OnError event handler for my package which sends an email containing the name of the file that fails import through my dataflow task. The problem is the dataflow experiences three errors (one for each task it is attempting to complete) which
in turn causes three duplicate emails to be sent.
I'd prefer to stop the dataflow task completely rather than allow it to try to complete the remaining tasks after the first error. Is this possible? Alternately, how can I set up my event handler to only send one email regardless of the number of dataflow
errors that occur?
Thanks in advance!
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.ValidationType = ValidationType.Schema
xslDes.ValidationFlags = XmlSchemaValidationFlags.ReportValidationWarnings
AddHandler xslDes.ValidationEventHandler, AddressOf xslDesValidationEventHandler
Dim des As XmlReader = XmlReader.Create(filename, xslDes)
Protected Sub xslDesValidationEventHandler(ByVal sender As Object, ByVal e As ValidationEventArgs)
'some code here
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
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.
Building a basic, reusable application framework can make development quicker and easier. This allows you to focus more on the problems at hand and less on the repetitive tasks involved in building any application. In this article, the author presents a framework that provides facilities to access the registry and an extensible framework for logging messages to a console window or the Event Viewer. This reusable framework can be included as a library in your projects, allowing you to display an enhanced, color-coded message log and dynamically change logging levels.
MSDN Magazine May 2003
I have a create user wizard on my page and in the event handler (Created User) I get extra information from the user
via textboxes within the aspx etc.
I then do a response.redirect to another page.
What I want to happen is this
When the CreatedUser Event is fired, I want a Modal Popup to show up with a message Processing your registration.
once the registration code is processed it will close and the users get redirected.
On my ASPX I have the Modal PopUp and a Panel.
In the code behind in the handler I put ModalPop.show()
but this does not work.
thanks for any suggestions
In my Create User Wizard1 Created User Wizard Event, I am collecting extra information from text boxes and allowing
the user to uplad a file.
I have put the Submit button within an Update Panel Tag but since I have done this it does not work.
Is there a way round it. In this situation would you use a trigger.?
<CustomNavigationTemplate> <div><br />
<asp:UpdatePanel ID="UpdatePanel2" runat="server"> <ContentTemplate>
<asp:Button ID="StepNextButton" runat="server" CommandName="MoveNext" align="middle" Text="Submit my Profile" />
I have a Workflow that is using an InfoPath task form. In the "FormEvents_Loading" method event handler I have some code that needs to run each time the form is opened. I recycle the App Pool and open the form the code runs perfectly, but
if I close and try to re-open the form the code is not run at all. I can then recycle the App Pool again and on the next load the code executes just fine. The code that is supposed to be run is a very simple statement to set a field value,
so I don't think it is interfering.
Does anyone know what this might be?
I have an InfoPath web-enabled form in MOSS 2007, that is integrated with a K2 blackpoint process for an approval workflow.
Once the form (a Purchase Order request form) has been approved in the K2 workflow process, I switch the form view to a "print-friendly" view for the requestor to view from the browser. However, now I need to go one step further with this scenario:
1) I need to somehow insert/embed an image with the scanned-in signature of the approver (likely stored in a SP doc library) at the signature line section of my form. Also, what are the security requirements for storing such images, but not granting
all users access to these (e.g. only services accounts that need to access this for embedding into the form, etc.)?
2) Then I need to convert this final "print-friendly" view of the form (with the signature image) to a PDF document so that I can store it in SharePoint (and email it to the requestor using K2's email event capabilities).
Can anyone help me with a solution to both of these requirement, or point me to some resources for this (even 3rd party components are open-game).