Web Forms :: Can Add Meta Tag Into A Page Generate From Masterpage
Mar 11, 2010i would like to know how to add meta tag into my aspx, if it is generated from a master page.i am using vb.net and visual developer.
View 7 Repliesi would like to know how to add meta tag into my aspx, if it is generated from a master page.i am using vb.net and visual developer.
View 7 RepliesOk my website I built for fun effeduptxt.com I am trying to take all the posts that are displayed and have the keywords for the page be auto generated at page load.
Now I know how to add keywords from code behind I just never tried to scrape the data in the database for what would be the best keywords to use.
Has anyone ever done this and or know where something like this is on the web.
I can create the SQL Query and the C# code how to determine what is a bogus word that should not be included such as I could count how many times each word is shown and go for the most common words as the keywords but that would include words like "And", "Or", "It" etc... and that would not be good.
I have no problem with studying more detail about it and expect to do so I just need to get set onto the right path....
I need to add Meta tags, description and keywords in aspx page. My aspx pages are in master page and I have already added meta tags and description in my Master Page.
Now I want add in my other pages also so if someone search my site on GOOGLE it should look like same as this:
[URL] ...
How to achieve this?
create db driven meta keywords/description. I would store these records in a database, xml format i presume; since it would be per culture.How would i go about doing this?
View 4 RepliesI have a number of .aspx pages inheriting from a common master page. I need to insert <meta> tags into the master page and this varies from page to page. What is easiest and fastest way to get this done. The thing is, my site is already developed so I dont want to rework/rewrite any of the code.
View 4 RepliesI populate mete tag from database according to this thread [URL] ....
In store.aspx page i have this behinde code
protected void Page_Load(object sender, EventArgs e) {
string data = Server.UrlDecode(Request.QueryString["BehCode"]);
SqlCommand _cmd = new SqlCommand("storeInfo", _cn);
_cmd.CommandType = CommandType.StoredProcedure;
_cmd.Parameters.AddWithValue("@BehCode",data);
_cn.Open();
[Code] ....
Here instead of
stringkeyword = _dr[0].ToString();
I put
string keyword = _dr["Keyword"].ToString();
But when i run website and see viewsource it doesn't show any thing in meta tag.
I want to redirect to login page,when session is timedout. Here is the link i am following [URL] ...
For example: If i am in the page called http://localhost/RealWebApp/Dashboard/RealProfile.aspx
when session is timed out, this page is showing like http://localhost/RealWebApp/Dashboard/logout.aspx
But i wanted to be like : http://localhost/RealWebApp/logout.aspx
If I use like this in master page:
meta.Content = Convert.ToString(Session.Timeout * 60) + ";url=../LogOut.aspx";
then it is redirecting to http://localhost/Logout.aspx
But i wanted to be like : http://localhost/RealWebApp/logout.aspx
How to accomplish this:
protected void Page_Load(object sender, EventArgs e) {
HtmlMeta meta = new HtmlMeta();
meta.HttpEquiv = "Refresh";
meta.Content = Convert.ToString(Session.Timeout * 60) + ";url=LogOut.aspx";
this.Page.Header.Controls.Add(meta);
}
i m implimenting one web which requires the content of meta tag how i get the content?
View 1 RepliesList<HtmlMeta> metas = new List<HtmlMeta>();
foreach (Control c in this.Page.Header.Controls)
if (c.GetType() == typeof(HtmlMeta))
{
HtmlMeta meta = (HtmlMeta)c;
if (meta.Name == "CategoryID")
strMeta = meta.Content;
}
[coder]...
I have a txt file with a list of <titles><meta keyword> and <meta description> and the link that these titles and tags should be associated with. how do i set the master page contentplaceholderid to read the text file and set the tags and titles accourding the the link on the txt file.
View 2 RepliesI have a simple site [URL]that I setup for my parents and other family member to share recipes on. The issue I have is that when I try to incorporate a google search the header is always RECIPE form from the dynamically driven site.
If page requested is [URL] in a SEO return I want it to have the title of the recipe to be Apple Sour Cream Crumble Pie not RECIPE FORM or RECIPE PRINT FULL FORM
How can I get this changed and also have metadata dynamically created to improve SEO returns?
I have a MasterPage (MasterPage.master) with 2 child MasterPages (specialMaster.master and standardMaster.master). From the MasterPage.master I need to get at some of the controls in one of the children, specialMaster.master, say for example to hide certain
content if a session variable is not null.
I have 2 masterpages. (Default.master and User.master).I have a hidden field in Default.master then how can i get the hidden field value of Default.master file from User.master.is there any way to access that hidden field like: Request.form("hidID") ?
View 2 RepliesIf I put everything on one page, it works fine. But when i try to integrate a masterpage, nothing outputs.
Master:
[Code]....
XML File:
[Code]....
I have created button (btnOtherlink) in my masterpage (Customer.aspx) and redirect to different website [URL] when i click the button (btnOtherlink). But im unable view the website when i click the button because the url redirected become like this http://localhost:51713/www.emetrics.com instead of w[URL] . How to redirect the page to [URL] from my masterpage ?
And how to hide the url so that users didnt see the url when redirected to new page ?
My coding :-
protected void btnOtherlink_Click(object sender, EventArgs e)
{
Response.Redirect(www.emetrics.com);
}
I have a masterpage and usercontrols in different tabs of the tab control. I need to access data from a user control in one tab from a user control in a different tab.
View 1 RepliesI have a function that sets the Theme for the page but I want to define this in a MasterPage for each page that uses that MasterPage. This seems like the most likely way to do this to me, am I doing something wrong?
Here is what I have:
[Code]....
If i copy this to an ASPX page it works but it doesn't seem to work at all in a MasterPage.
I have done master page and some content page..I have put three LABEL(not in inside the Content place holder) in masterpage and l have store some value..in this, the same value i want to use in content page..how to get that masterpage content value.
View 19 RepliesMy masterpage for my website has the Login control which sits right on my main nav bar. The problem I have is that I'm currently not detecting the current page hence not setting the ReturnUrl parameter. So when the user clicks login and goes through the login process, he/she is sent back to the home page.
How can I set the ReturnUrl while still keeping the Login control in the master page?
accessing a table on a page's masterpage.
So I have a sitemaster page and I am getting header and footer controls from it. But for a perticular page I would like not to show the footer and just the header.
Therefore, I am trying to access the master page table control with id "footer".
What I have tried and they all didnt work. First I tried,
Dim ptrMaster As MasterPage = Page.Master
ptrMaster.FindControl("footer").Visible = False
This gives me a null pointer error.
Then I tried to put in a accessor method on the site.master (masterpage) itself.
Public Sub HideFooter()
Me.Controls("footer").Visible = False
End Sub
But the problem here is when I create a masterpage object on the page that I would like to not show the footer. I cant see the method. So if I do
Dim ptrMaster As MasterPage = Page.Master
ptrMaster.HideFooter()
HideFooter doesnt show up as a method.
I'm using a CMS, which removes my ability to access the actual Page, I can only program Master pages. I need to set the Async property of the @Page directive on a particular page, but can't figure out how to do so from the Master page.
View 2 RepliesCreating a simple CMs syetm and wish to provide the user with the ability to view the masterpage within a page. Basically want to render the masterpage and allow uses to drag a box within the contentholder areas. Similar to SiteFinity if anyone has seen that. I have had a look at other CMS systems and SiteFinity appears to be the only one doing this?
View 1 Repliesis it possible to put two different contentPlaceHolder from two different ASPX page in one MasterPage? Just like iFrame? if not what asp.net process/control can?
View 3 Repliesi have a page with one master page.in my master page i have a image control(the id is testimg) in codebehind and in pre_init in want to chang picture.when the user is user1 img1 and when user is user2 ,img2 i wrote this code,but it has error
[Code]....
i have a masterpage and an default.aspx page that derives from masterpage. On default.apsx, i list products. when i click add basket buton that product is added to shoppingbasket. i do this using jquery. On mastepage,there is a label that shows how many product is in shopping basket. i want to do this. when i click add basket on default.aspx, label control on masterpage show the new product count on shoppingbasket.How can i access masterpage control and change using javascript/jquery from default.aspx.
View 7 Replies