如何更改地址栏中的扩展名就像.aspx,ascx [英] how to change extension in address bar is like .aspx, ascx

查看:94
本文介绍了如何更改地址栏中的扩展名就像.aspx,ascx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何更改地址栏中的扩展名就像.aspx,ascx

Hi,

how to change extension in address bar is like a .aspx, ascx
where can add code???

推荐答案

.ascx扩展用户,当我们要定义自己的用户控件时.
制作自己的用户控件时,必须遵循以下步骤使用
1将.aspx扩展名重命名为.ascx
@page的2个html基类(html代码的第一行)更改为@control
3取下身体和头部标签
asp.net的4个主要代码转到第一行是这样的:
公共局部类_Default:System.Web.UI.Page
变成
公共局部类_Default:System.Web.UI.UserCXontrol
.ascx extension user for when we want to define our self user control.
following step use must follow when you make your own usercontrol
1 rename .aspx extension into .ascx
2 html base class of @page (1st line of html code) change into @control
3 remove body and head tag
4 main code of asp.net go to 1 st line is it like this :
public partial class _Default : System.Web.UI.Page
change into
public partial class _Default : System.Web.UI.UserCXontrol


这篇关于如何更改地址栏中的扩展名就像.aspx,ascx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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