LYF模板连接.txt
在解决方案里创建了一个新建网站,在其右键下添加一个模板后,
准备使用模板的,在添加新建项里突然没有“使用模板页的web窗体”,
顿时感觉悲剧。。。
解决方法:
模板页代码---LYFMaterPage.Master--------------------------------------------------------------------------------
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="LYFMaterPage.master.cs" Inherits="WebApplication1.LYFMaster.LYFMaterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<asp:ContentPlaceHolder ID="headScriptLYF" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
模板页后台代码---LYFMaterPage.Master.cs---------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication1.LYFMaster
{
public partial class LYFMaterPage : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
模板页设计代码-------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace WebApplication1.LYFMaster {
public partial class LYFMaterPage {
/// <summary>
/// headScriptLYF 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.ContentPlaceHolder headScriptLYF;
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// ContentPlaceHolder1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.ContentPlaceHolder ContentPlaceHolder1;
}
}
-----------------------------------------------------------------------------------------------------------------
网页代码---WebForm1.aspx---------------------------------------------------------------------------------------------
<%@ Page Title="" Language="C#"
MasterPageFile="~/LYFMaster/LYFMaterPage.Master" 此句就是当前网页使用的模板
AutoEventWireup="true"
CodeBehind="WebForm1.aspx.cs"
Inherits="WebApplication1.LYFwebPage.WebForm1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="headScriptLYF" runat="server">
注意: ContentPlaceHolderID="headScriptLYF" 的值就是模板页中ID的值
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
--------------------------------------------------------------------------------------------------------------
LYF模板连接.txt的更多相关文章
- [20170824]11G备库启用DRCP连接.txt
[20170824]11G备库启用DRCP连接.txt --//参考链接:http://blog.itpub.net/267265/viewspace-2099397/blogs.oracle.com ...
- jdbc 模板 连接
package itcast; import java.sql.Connection;import java.sql.DriverManager;import java.sql.ResultSet;i ...
- 使用ABP EntityFramework连接MySQL数据库
ASP.NET Boilerplate(简称ABP)是在.Net平台下一个很流行的DDD框架,该框架已经为我们提供了大量的函数,非常方便与搭建企业应用. 关于这个框架的介绍我就不多说,有兴趣的可以参见 ...
- Web Api2 用户认证模板解析---本地用户
本文我们将把关注Visual Studio用户认证模板中的 本地用户名/密码帐号特性.他们将其分为了两部分:帐户控制器具备如创建帐号和修改密码等功能:另一部分是在OAuth2认证服务器中进行的认证.我 ...
- HTML模块化:使用HTML5 Boilerplate模板
HTML5 Boilerplate 是一个由 Paul Irish(Google Chrome 开发人员.jQuery 项目成员.Modernizr 作者.yayQuery 播客主持人)主导的“前端开 ...
- Java 前端模板引擎学习:thymeleaf 模板引擎
模板引擎接口 ITemplateEngine 一.后台数据与外部数据 1.处理后台数据 $表达式是个变量表达式,用于处理在 request parameters and the request, s ...
- 给zabbix添加percona监控模板
简单说明一下给zabbix添加的percona的监控模板. 在percona官方网站有说明怎么安装,这里记录下步骤.首先搭建好的zabbix环境. 监控插件连接 : 链接:https://pan.ba ...
- 按照已有的模板打印小票<二> ——调用windows打印机打印 可设置字体样式
按照已有的模板打印小票<二> ——调用windows打印机打印 可设置字体样式 之前写过一篇文章<按照已有的模板输出一(如发票)>,是关于如何给已有的模板赋值.在项目的实践过程 ...
- Meteor模板
Meteor模板使用三个顶级标签.前两个是 head 和 body 标签.这些标签和在普通的HTML中做的工作一样.第三个标签 template.这是我们将HTML连接到JavaScript的地方. ...
随机推荐
- Redis性能问题排查解决手册
转自:http://www.cnblogs.com/mushroom/p/4738170.html 阅读目录: 性能相关的数据指标 内存使用率used_memory 命令处理总数total_comma ...
- 压测软件-Tsung.安装篇
author :James,jimingsong@vip.qq.com author :James,jimingsong@vip.qq.com since :2015-03-02 tsung介绍 ts ...
- 干货篇:揭开CSS盒模型神秘的面纱
写博客可以对学习内容进行总结.分享和交流(面对面的技术分享会也不错)... 如果是单纯的记录,印象笔记完全够了. 步入正题,盒模型是web布局核心,掌握基础知识,以后实战中会如鱼得水~ 概念与历史 C ...
- HDU 3294 Girls' research
题目地址 manacher #include<cstdio> #include<string.h> #include<algorithm> using namesp ...
- How to use php serialize() and unserialize()
A PHP array or object or other complex data structure cannot be transported or stored or otherwise u ...
- laravel 日志
laravel学院的 http://laravelacademy.org/post/195.html 他人博客的 http://www.cnblogs.com/yjf512/p/4173261.htm ...
- css3实现进度条
HTML 结构很简单,但不是 Single Element: <div class="spinner"><i></i></div> ...
- Ubuntu下 hadoop2.5.1 (伪分布模式) 配置工作
一:安装JDK hadoop 是以java语言写的,因此需要在本地计算机上预先安装JDK,安装JDK的方法这里不再详述. 二:创建hadoop用户 为hadoop创建一个专门的用户,将所有的hadoo ...
- TortoiseGit 错误信息Aborting commit due to empty commit message.解决
错误信息: Aborting commit due to empty commit message. git不能完全退出(退出码 1) (47 ms @ 2016/2/19 14:03:24) 解决办 ...
- filter过滤action的问题
今天犯了一个错误,结果白白浪费了半个下午的时间,特记于此. filter过滤Action的时候,要把过滤器配置在Struts2拦截器的前面,这样过滤器才能过滤到Action,否则不可以.