我想创建一个仅用于删除我的对象的文件,但它只会删除某些内容,然后重定向到不需要显示任何内容的源页面(仅需要Page_Load
)。
对于这个目标,我可以使用任何类型来代替aspx
没有内容部分的常规类型吗?
我想创建一个仅用于删除我的对象的文件,但它只会删除某些内容,然后重定向到不需要显示任何内容的源页面(仅需要Page_Load
)。
对于这个目标,我可以使用任何类型来代替aspx
没有内容部分的常规类型吗?
您可以使用处理程序 .ashx。您可以在此处查看教程:http: //www.dotnetperls.com/ashx
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