fields of the table is ( NewsID, NewsTitle, NewsDetails, NewsDate)
record in the table {
NewsID
NewsTitle
NewsDetails
NewsDate
1
Google avoids legal action in US
Google makes 'significant changes' to how it does business to avoid legal action from US regulator the Federal Trade Commission.
5/1/2013 3:15:16 AM
}
now if I open this link: http://localhost:7695/mywebsite/details.aspx?NewsID=1 , I want the "NewsTitle" field become the title of the page which is "Google avoids legal action in US" ?
oned_gk
All-Star
31361 Points
6411 Posts
Re: News Title in title bar
Jan 05, 2013 08:54 AM|LINK
you can set title using string maybe from datatable like
Asos
0 Points
22 Posts
Re: News Title in title bar
Jan 05, 2013 01:40 PM|LINK
Thanks oned_gk
i don't know how to do it.
that is my database
table name: News
fields of the table is ( NewsID, NewsTitle, NewsDetails, NewsDate)
record in the table {
Google makes 'significant changes' to how it does business to avoid legal action from US regulator the Federal Trade Commission.
}
now if I open this link: http://localhost:7695/mywebsite/details.aspx?NewsID=1 , I want the "NewsTitle" field become the title of the page which is "Google avoids legal action in US" ?
could you explain it for me how to do it?
thanks in advince
ramramesh
Member
458 Points
158 Posts
Re: News Title in title bar
Jan 05, 2013 01:47 PM|LINK
Do you like select query for
select NewsTitle from News
Asos
0 Points
22 Posts
Re: News Title in title bar
Jan 05, 2013 02:24 PM|LINK
yes but i want "NewsTitle" become the titleof the page
i want it show it title bar of web browser
ramramesh
Member
458 Points
158 Posts
Re: News Title in title bar
Jan 05, 2013 02:50 PM|LINK
use select query and get NewsTitle then store your title in the query return NewsTable
Asos
0 Points
22 Posts
Re: News Title in title bar
Jan 05, 2013 03:18 PM|LINK
but how to do that?
Pengzhen Son...
Star
8189 Points
842 Posts
Microsoft
Re: News Title in title bar
Jan 11, 2013 08:13 AM|LINK
Hi,
I think you can try using the code in master page as follows:
<%@ Master ... %>
<html> <head runat="server">
<title><asp:ContentPlaceHolder ID="titleContent" runat="server" /></title>
<asp:ContentPlaceHolder ID="headContent" runat="server">
</asp:ContentPlaceHolder>
</head>
And then set the title from the content page:
Hope it can help you.Feedback to us
Develop and promote your apps in Windows Store