- 一个document type对应多个template, 通过改变URL访问不同的template页面,例如我们创建了一个名为product的document type,对应的template分别为product,create,edit,其中product为默认的template,我们创建了一个名为product1的node,访问它的URL一般为product1.aspx, 我们也可以通过product1/product.aspx访问,访问crate和edit的方法分别为product1/create.aspx和product1/edit.aspx。也可通过product1.aspx?altTemplate = product的方式访问。
- 页面出现
A potentially dangerous Request.Form value was detected from the client
错误,原因是返回到服务器端的post中含有非法字符串,这是asp.net自带的一个认证功能,可以通过在master模板也中添加<umbraco:DisableRequestValidation runat="server"/>解决,但要注意添加后,在服务器端获取数据时要对数据做encode,以防止非法攻击。
umbraco杂记(持续更新中。。。)
最新推荐文章于 2019-01-14 00:03:09 发布