在VS中创建一个applicationPage映射到Layouts文件夹下,然后代码如下:

SPList lstTest = web.Lists["Shared Documents"];

string newUrl = string.Format("layouts/NewEditForm.aspx", web.ServerRelativeUrl, lstTest.RootFolder.Url);

var form = web.GetFile(newUrl);

if (form != null && form.Exists)

{

 //string newFomrUrl = lstTest.DefaultEditFormUrl.Replace("EditForm.aspx", "docEditForm.aspx");

  lstTest.DefaultEditFormUrl = newUrl;

  lstTest.Update();

}

  

how to create a custom form for sharepoint list的更多相关文章

  1. [Angular] Create a custom validator for reactive forms in Angular

    Also check: directive for form validation User input validation is a core part of creating proper HT ...

  2. [Angular] Create a custom validator for template driven forms in Angular

    User input validation is a core part of creating proper HTML forms. Form validators not only help yo ...

  3. [转]How do you create a custom AuthorizeAttribute in ASP.NET Core?

    问: I'm trying to make a custom authorization attribute in ASP.NET Core. In previous versions it was ...

  4. Part 13 Create a custom filter in AngularJS

    Custom filter in AngularJS 1. Is a function that returns a function 2. Use the filter function to cr ...

  5. How could I create a custom windows message?

    [问题] Our project is running on Windows CE 6.0 and is written in C++ . We have some problems with the ...

  6. Create and Call HttpHandler in SharePoint

    Create and Call HttpHandler in SharePoint Requirement: 1. Create a httphandler, and reture json data ...

  7. [Angular] Implement a custom form component by using control value accessor

    We have a form component: <label> <h3>Type</h3> <workout-type formControlName=& ...

  8. how to create react custom hooks with arguments

    how to create react custom hooks with arguments React Hooks & Custom Hooks // reusable custom ho ...

  9. [Angular2 Form] Create custom form component using Control Value Accessor

    //switch-control component import { Component } from '@angular/core'; import { ControlValueAccessor, ...

随机推荐

  1. Druid手动创建连接的坑

    环境:druid 1.1.10 今天优化了一天的代码, 老代码手动创建连接,坑 Connection conn = DBUtil.getConnection("d_log_dot_" ...

  2. Java线程同步打印ABC

    需求: 三个线程,依次打印ABCABCABC.... 方案一: 使用阻塞队列,线程1从队列1获取内容打印,线程2从队列2获取内容打印,线程3从队列3中获取内容打印.线程1把B放到队列3中,线程2把C放 ...

  3. keepalived+nginx 高可用集群

    一.什么是高可用?   nginx做负载均衡,能达到分发请求的目的,但是不能很好的避免单点故障. 1.nginx集群单点问题 分发器宕机怎么处理? 假如nginx服务器挂掉了,那么所有的服务也会跟着瘫 ...

  4. Android DataBinding实现地址三联动

    这篇文章主要是写关于Android实现地址三联动的功能,现在附上demo地址:https://github.com/qiuyueL/NewAddressDemo,里面会有详细的注释,以及控件的使用,其 ...

  5. 【代码笔记】Java基础:Java的方法和类

    面向过程与面向对象都是我们编程中,编写程序的一种思维方式.例如:公司打扫卫生(擦玻璃.扫地.拖地.倒垃圾等), 按照面向过程的程序设计方式会思考“打扫卫生我该怎么做,然后一件件的完成”,最后把公司卫生 ...

  6. html和css命名-望文生义

    HTML+CSS命名规则 在一个内容较多的HTML页面中,需要设计许多不同的框架,再为这些不同的框架及内容进行分类,给予相应的名称,从而使得网页结构更加清晰,也为工作提供了方便.许多新手朋友在设计一个 ...

  7. mfc自动创建按钮消息处理并清除

        以前参加一次面试有这道题,当时没有网络没有做出来,今天在网上整理了一下,实现如下. .h中增加下面代码     //生成的消息映射函数     virtual BOOL OnInitDialo ...

  8. Arcobject获得栅格影像的边界

    一般的各种遥感影像都是采用某种地理或投影坐标的栅格影像,对于从事影像相关工作的人来说,得到现有影像的覆盖范围是确定研究内容,购买遥感影像的基础.怎么得到这个覆盖范围呢?当然我们可以在ArcGIS或ER ...

  9. Aligning Plots in a Column作图列对齐

    Plot[Sin[x], {x, 0, Pi}] Plot[10000 Sin[x], {x, 0, Pi}] 直接作图左边无法对齐,影响图的美观.可以使用左边界空格实现列对齐,代码如下: optio ...

  10. 3D开源推荐:全球卫星地图 Esri-Satellite-Map

    演示网址:http://richiecarmichael.github.io/sat/index.html 开源网址:https://github.com/richiecarmichael/Esri- ...