1

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.

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)

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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