0

我想创建一个仅用于删除我的对象的文件,但它只会删除某些内容,然后重定向到不需要显示任何内容的源页面(仅需要Page_Load)。

对于这个目标,我可以使用任何类型来代替aspx没有内容部分的常规类型吗?

4

2 回答 2

3

您可以使用处理程序 .ashx。您可以在此处查看教程:http: //www.dotnetperls.com/ashx

于 2013-06-10T08:30:20.627 回答
0

try this put your pageload event code in public static method

    public static void MethodName()//pass parameter if required
    { 
        //do your work here ;
    }

after that you can directly access this method from whatever your page

于 2013-06-10T08:37:49.727 回答