pasquale
07-11-2007, 10:52 AM
Hi all,
please I need your help. Im completed stucked on something that Im not able to do in VB .NET....
I created a master page containing this Literal in the Head:
<head runat="server">
<title><asp:Literal id="harriertitle" runat="server"></asp:Literal></title>
<vccp:meta ID="pageMeta" runat="server" />
</head>
Then I create a page container that use this master page, and I need to change in the Page_Load the value of the Literal "harriertitle" with the title of the page, this is the backend code:
Partial Class materPages_landing
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
harriertitle.Text = "my title" <-- this is wrong!!, because harriertitle is in Master page not in landing.aspx.............??
Master.FindControl("harriertitle") ???? <-- this is wrong!!
How can I access to the Literal whose id is "harriertitle"?????
End Sub
End Class
This is the front-end code:
<%@ Page Language="VB" MasterPageFile="~/materPages/main.master" AutoEventWireup="false" CodeFile="landing.aspx.vb" Inherits="materPages_landing" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
How can the landing.aspx change the value of the literal in the Master??
Please help me..I need urgently your help... Otherwise Im going to lose my new job.....
Please answer me as soon as possible...
Many Thanks
please I need your help. Im completed stucked on something that Im not able to do in VB .NET....
I created a master page containing this Literal in the Head:
<head runat="server">
<title><asp:Literal id="harriertitle" runat="server"></asp:Literal></title>
<vccp:meta ID="pageMeta" runat="server" />
</head>
Then I create a page container that use this master page, and I need to change in the Page_Load the value of the Literal "harriertitle" with the title of the page, this is the backend code:
Partial Class materPages_landing
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
harriertitle.Text = "my title" <-- this is wrong!!, because harriertitle is in Master page not in landing.aspx.............??
Master.FindControl("harriertitle") ???? <-- this is wrong!!
How can I access to the Literal whose id is "harriertitle"?????
End Sub
End Class
This is the front-end code:
<%@ Page Language="VB" MasterPageFile="~/materPages/main.master" AutoEventWireup="false" CodeFile="landing.aspx.vb" Inherits="materPages_landing" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
How can the landing.aspx change the value of the literal in the Master??
Please help me..I need urgently your help... Otherwise Im going to lose my new job.....
Please answer me as soon as possible...
Many Thanks