开发者

Asp.net master page

how 开发者_StackOverflow中文版to Bind webpages that's already created with a new master page ?


AT Page_PreInit event you can set master page.

for example

protected void Page_PreInit(object sender, EventArgs e)
    {
        this.MasterPageFile = "Master.master";
    }


You will need to change the markup in the .aspx file something along the following lines

1) Remove html head & body

2) Insert ASP:CONTENT tag

3) Insert MasterPageFile attribute in @PAGE directive

To be honest the easiest way might be to just create a new content page, select the masterpage and then copy any markup you need into the panel and copy your codebehind over too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜