简体   繁体   中英

How can you override Upload.aspx or AllItems.aspx etc. SharePoint 2013 (NOT SP Designer)

Does anyone know how to override the code that is executed when a user clicks on "new item". I want to use a custom template / code, so the user will not have to upload the new file each time the person will create a new document. Simply skip this section and upload the template file in code behind. All of this must bee done in cod, so it can work in every SP solutions. Thanks!

I'm not 100% sure about this, but with previous versions, you were able to define custom content types , add them to a doc lib and then choose the template as new item.

maybe you want to take a look at this: http://www.learningsharepoint.com/2013/04/21/how-to-create-a-content-type-in-sharepoint-2013/

regarding your attempt to directly manipulate sharepoint internal code, that's not possible since microsoft doesn't allow usercode in core components .

maybe you want to create a webpart with a "new item"-button, which of course allows usercode. On click you create a new item, upload the template and redirect to the doclib.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM