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

Help!

In MOSS 2007 how do you make a custom newform/editform.aspx for a particular sharepoint list call a custom rendering template with custom code-behind logic? In particular how do you override the newform.aspx/editform.aspx savebutton method by using your own derived button class and assembly? This assembly should not override ALL save button logic for all forms but only for a particular sharepoint list.

share|improve this question
add comment

1 Answer 1

You can write event handler (adding or added or updating or updated) and make sure to do you logic after you verify the list name.

for example:

splist list = web.list["name of the list"];

if list.exists or something like this then do your event handler work else return.

hope this helps. (assuming list name or title will remain same)

share|improve this answer
    
If you're doing code inside an Event Receiver, you will have the List Object in the properties of the event handler method you're overriding. –  James Love Jul 21 '11 at 20:46
    
Problem is that the event-handling code needs to be limited to that list and be run from a separate assembly. Issue is that custom event handling is not being recognized by the site because the custom rendering template itself isn’t even recognized. Any idea how to get the rendering template to be recognized by the site? –  Sophie McGough Jul 21 '11 at 20:59
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.