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

whats sharepoint renderingtemplate is and how can I use it to add event handler to "Respond to this survey" link button

For last couple of days I have been researching on how to add some kind of event receiver to "Respond to this survey" link button.

I am not really sure where this button came from as if its part of a form or a view but I came across THIS tutorial which is doing something similar however it didn't worked for me without any errors in ULS log or event receiver.

Also I am confused with all of the coding "Elements" in ascx file in tutorial and if someone can explain them to me please.

Note: We have customized survey module of SharePoint so its not out of box.

share|improve this question
add comment

2 Answers 2

i think this might give you some insight as someone tryd to do somthing very similar:

"Respond to this Survey" is rendered by " runat="server" />.

That is your answer right there :) , you need to create a class that can overwrite sharepoint link button :).

You need to create a class that inherits from the following: Microsoft.Sharepoint.WebControls.NewMenu

for a detailed explantation with steps in how to do it follow this:

http://blogs.msdn.com/b/pavankumar/archive/2010/03/19/how-to-hide-respond-to-this-survey-when-a-user-has-already-responded-to-the-survey.aspx

Yes its for hiding the button but instead of hiding you can assign it an event to override (click event) and do what you want to do ;)

hope it helps :)

share|improve this answer
add comment
up vote 0 down vote accepted

I searched a lot but I am not able to find a way to set event handler on "Respond to Survey" link button because its just a link which is added to menu bar, however I created a custom new form and added my code in page_load method of Custom New Form.aspx.

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.