I was used a FormView to show data in my page :
<asp:FormView ID="PFull" runat="server" >
<ItemTemplate>
<div class="post_con">
<h4 class="post-headers"><asp:HyperLink ID="hprPTitle" runat="server" NavigateUrl='<%#Eval("PID","~/Paper.aspx?pid={0}")%>'><%#Eval("PTitle")%></asp:HyperLink></h4>
</div>
</ItemTemplate>
</asp:FormView>
Bind form view :
public void ShowFullPaper(int id)
{
DataTable dt = paper.ShowFullPaper(Convert.ToInt32(Request.QueryString["pid"]));
PFull.DataSource = dt;
PFull.DataBind();
}
Now, I want change title of page with text of that hyperlink with this :
protected void PFull_DataBound(object sender, EventArgs e)
{
this.Title = ((HyperLink)PFull.FindControl("hprPTitle")).Text;
}
But That is not work. help me please...
Thanks.