事实之后将Web窗体转换为Web内容窗体. (.网) [英] Convert Web Form to Web Content Form after the fact. (.net)

查看:93
本文介绍了事实之后将Web窗体转换为Web内容窗体. (.网)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站已有数年历史,其中包含约30个aspx Web表单页面,其中包含代码. 我想以最少的工作量向所有这些页面添加一个通用母版页.

I have a site a few years old that contains about 30 aspx Web Form pages with code behind. I want to add a common master page to all these with the minimum amount of work.

基本上,我只需要将body标签中的所有内容添加到内容占位符,并保留后面的代码即可.

Essentially, I just need to add everything in the body tags to the Content Placeholder, and preserve the code behind.

有快速的方法吗?

推荐答案

对于每个页面,请执行以下操作 -将属性添加到名为MasterPageFile ="Your MasterPage Path"的< @Page>标记中 -添加以下标签 -删除html和head标记及其内容(正文标记除外) -删除身体标签,但要保留其内容 -删除表单标签 -完成

For each page do the following - Add an attribute to the <@Page > tag named MasterPageFile="Your MasterPage Path" - Add the following tag - Remove html and head tags and their contents except body tag - Remove the body tags BUT KEEP its contetnts - Remove the form tag - Done

这篇关于事实之后将Web窗体转换为Web内容窗体. (.网)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆