简体   繁体   English

如何开发自定义aspx页面?

[英]How to develope custom aspx page?

i have a special question i really want to learn how to develop custom aspx page forexample;我有一个特殊的问题,我真的很想学习如何开发自定义 aspx 页面,例如; if you create a aspx page automatically page created:如果你创建一个aspx页面自动创建页面:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Test.xyz
{
    public partial class MyPage: System.Web.UI.Page
    {
    }
}

But i want to develop: like that if a press create aspx page:但我想开发:就像这样,如果按创建 aspx 页面:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI;
using System.Web.UI.WebControls;
using MyFrameWork.Business;
sing MyFrameWork.DAL;
namespace Test.xyz
{
    public partial class MyPage: System.Web.UI.Page
    {
    }

   protected void Save()
{

}

   protected void Delete()
{

}
}

Howw to generate this page right click - Add new Item (Automatically)如何生成此页面右键单击 - 添加新项目(自动)

You need to create a new item template.您需要创建一个新的项目模板。 This page describes what you need:此页面描述了您需要的内容:

Link关联

(Basically you create your page, then goto File>Export Template and follow the wizard.) (基本上你创建你的页面,然后转到文件>导出模板并按照向导。)

It sounds like you're trying to edit Visual Studio's default template for ASPX code-behind files.听起来您正在尝试为 ASPX 代码隐藏文件编辑 Visual Studio 的默认模板。

You ca n find it in C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\Web\1033您可以在C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\Web\1033中找到它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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