locked
Beginner Help RRS feed

  • Question

  • User-1528860462 posted

    Hello All!

    New here thanks for having me.

    Ok, I am an old .php and HTML guy, usually have people to help.

    But I have an .aspx site that I need some very basic help with.  How do I edit content on the pages, it adding images and text (I did search for a while and did not find anything).  I know with .php there are templates with areas that relate to pages that you change.  But not seeing where these reside on this site.

    Also, I want to edit the meta info on the page, but the only articles I can find are the ones that do this dynamically.  I wanted to change each page individually.

    Any help?

    Thanks

    Wednesday, March 28, 2018 5:00 PM

All replies

  • User177399542 posted

    This depends upon your website structure, If you are using MasterPage. (This would be same as layout/templates in PHP).

    To change meta info for entire site (Common for all pages) you need to find your master page(File with extension .master).

    If you wants to change in individual files then, search pages with "pageNameYouWantToChange.aspx" you can add there.

    For more info you can share your folder/page structure.

    Thursday, March 29, 2018 5:45 AM
  • User1400794712 posted

    Hi McBrett,

    How do I edit content on the pages, it adding images and text (I did search for a while and did not find anything).

    What do you mean? Do you mean to add some images and textboxes int the page? In View option, choose Toolbox, there're many controls in it. Do you mean them? If not, please give more details about your requirement, then I can understand your problem better.

    Also, I want to edit the meta info on the page, but the only articles I can find are the ones that do this dynamically.  I wanted to change each page individually.

    If you want to modify the meta of the specify page, you can use following code in this page's cs code:

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //Add new Meta
            //var keywords = new HtmlMeta { Name = "keywords", Content = "one,two,three" };
            //Header.Controls.Add(keywords);
            
            //Modify
            HtmlHead pHtml = Page.Header;
            foreach (HtmlMeta metaTag in pHtml.Controls.OfType<HtmlMeta>())
            {
                metaTag.Content = "Yeah!";
                metaTag.Name = "keywords";
            }
        }
    }

    Best Regards,

    Daisy

    Thursday, March 29, 2018 7:25 AM
  • User-1528860462 posted

    Thanks!  I figured it out.  Much apprecited.

    Thursday, March 29, 2018 12:17 PM