Body question

Results 1 to 3 of 3

Thread: Body question

  1. #1
    Join Date
    Dec 1969

    Default Body question

    &nbsp;<BR>Is it possible to add an attribute to the Body of an aspx page using code-behind?<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Body question

    What are you trying to add to the Body?<BR><BR>I&#039;m not sure if you can add an attribute to the Body but there might be a work around for what you are trying to do.

  3. #3
    Join Date
    Dec 1969

    Default Surely you can

    &#060;body id="mybody" runat="server"&#062;<BR><BR>code-behind:<BR>//under class declaration<BR>protected System.Web.UI.HtmlControls.HtmlGenericControl mybody;<BR><BR>private void Page_Load(object sender, System.EventArgs e)<BR>{<BR> mybody.Attributes.Add("bgcolor","yellow");<BR>}<BR >

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts