ASP.NET中的PreviousPage.Title存在问题 [英] A problem withPreviousPage.Title in ASP.NET

查看:145
本文介绍了ASP.NET中的PreviousPage.Title存在问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

我在asp中有一个关于PreviousPage的问题。

尽管我写的代码正确识别了上一页,

但是PreviousPage.Title属性显示为空,

但它有价值。

那么问题是什么?



代码如下:



Hi everybody.
I had a question about PreviousPage in asp.
Although the code i've wrote recognizes the previous page correctly,
but the PreviousPage.Title property of that is shown empty,
however it has value.
So whats the problem by that?

code is in below:

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <title>Hi</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <asp:Button runat="server" Text="ویرایش اخبار" PostBackUrl="~/pages/news.aspx"/>        
        <asp:Button runat="server" Text="ویرایش محصولات" PostBackUrl="~/pages/products.aspx"/>
</asp:Content>

< br $> b $ b



protected void Page_Load(object sender, EventArgs e)
    {
        if (PreviousPage != null)
        {
            prevPageTitle = PreviousPage.Title;
        }
        fillPage();
        this.DataBind();
    }





谢谢。



Thanks.

推荐答案

它将是如果您要发布代码,那就更好了
it will be better if you will post your code


这篇关于ASP.NET中的PreviousPage.Title存在问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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