Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

When any user clicks on "Responds to Survey" button/link I want to perform some operation using code behind but can't figure out how can I do it or which event handler can be used.

share|improve this question
    
Can you please describe what sort of operation do you want to perform? I mean the operations that you want to perform, is it going to affect the new item that is going to be added or some other operations? –  Diptarag Nov 27 '12 at 13:40
add comment

2 Answers 2

up vote 1 down vote accepted

You cannot use any event handler as its not a button but just only link to Newform.aspx for adding new responses to survey list. you can create a custom list with custom newform.aspx form with page_load method to do the code behind you want to do.

yaron.

share|improve this answer
add comment

there is this solution to your problem, you need to use Javascript tho:

http://techtrainingnotes.blogspot.co.uk/2010/12/sharepoint-modifying-respond-to-this.html

surveys are lists and with event reciver you can only do the following as the are lists:

Item adding - Item added

Item updating - Item updated

Item deleting - Item deleted

for more info look here:

http://blogs.msdn.com/b/cliffgreen/archive/2008/04/06/understanding-event-receivers-in-a-sharepoint-survey.aspx

or

add a hidden feature that is activated on that page. in codebehind of feature you find the control and create an event handler and do what you want in that click event.

hope it helps

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.