InstantASP Community Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        


Adding Style Sheet to New User... Expand / Collapse
Author
Message
Posted 17/01/2004 13:41:00
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Customers
Last Login: 28/03/2005 07:40:00
Posts: 12, Visits: 1

If I added a new control, something simple like below.  How can I add the stylesheet settings to it?

Thanks

newcontrol.ascx

 <table class="ForumsBackGroundTableLight" cellSpacing="1" cellPadding="3" width="220">
  <tr>
   <th  align="left" colspan="2">
    &nbsp;HEADEDR
   </th>
  </tr>
  <tr>
   <td  align="left" valign="top" colspan="2">
    <table cellspacing="1" border="0" cellpadding="2">
     <tr>
      <td align="left">
       <font size="-1">*</font><a href=""><font size="-1" color="#003366">ITEM 1</a></font>
      </td>
     </tr>
     <tr>
      <td align="left">
       <font size="-1">*</font><a href=""><font size="-1" color="#003366">ITEM 2</a></font>
      </td>
     </tr>
     <tr>
     
    </table>



dc
Post #1580
Posted 17/01/2004 13:50:00


IF.NET 4.2 Coming Soon

IF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming Soon

Group: Administrators
Last Login: 2 days ago @ 11:53:33
Posts: 1,959, Visits: 3,027

Hi Derek,

Good question the table template is something like...

<table width="100%" align="center" cellpadding="0" cellspacing="0" class="ForumsBackGroundTable"><tr><td>

  <table width="100%" cellpadding="5" cellspacing="1">
  <tr><td class="ForumsHeader" colspan="2">My New Control</td></tr>
  <tr><td class="ForumGroupHeader" colspan="2">Sub Header</td></tr>
  <tr>
  <td width="20" class="ForumsBody2">Forum Name:</td>
  <td width="98%" class="ForumsBody1">Some content here...</td>
  </tr>
  </table>

</td></tr></table>

Hope this helps




Kindest Regards,

Ryan Healey
Director / Developer

Explore our products...
http://demos.instantasp.co.uk/

Post #1581
Posted 19/01/2004 01:34:00
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Customers
Last Login: 28/03/2005 07:40:00
Posts: 12, Visits: 1

How would you link that control if its outside of the forum files...for instance, outside of having it in the header "If.global.js " file.  I'm using the forums for the intranet part, but I like the style, so i wanted to continue to use the box layouts throughout, without that header I lose the stye sheets.



dc
Post #1583
Posted 19/01/2004 01:37:00


IF.NET 4.2 Coming Soon

IF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming Soon

Group: Administrators
Last Login: 2 days ago @ 11:53:33
Posts: 1,959, Visits: 3,027

Hi Derek,

To use the styles outside the application you could simply add the style sheet to the top of your user control. For example...

<link href="http://www.domain.com/forums/skins/Classic/style.css" rel="stylesheet" type="text/css">

or in your ascx add...

<link id="StyleSheet" runat="server"/>

then in your ascx.vb add...

Private Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs)

        If Session("InstantForum_Skin") <> "" And Session("InstantForum_SkinPath") <> "" Then
            StyleSheet.Attributes("href") = Session("InstantForum_Skin") & "style.css"
        Else
            StyleSheet.Attributes("href") = _
            ConfigurationSettings.AppSettings("InstantForum_SkinURL") & _
            ConfigurationSettings.AppSettings("InstantForum_DefaultSkin") & "/style.css"
        End If
  
End Sub

Hope this helps




Kindest Regards,

Ryan Healey
Director / Developer

Explore our products...
http://demos.instantasp.co.uk/

Post #1586
Posted 02/06/2005 10:46:48
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Customers
Last Login: 05/08/2008 13:31:25
Posts: 17, Visits: 75
Is Session("InstantForum_Skin") also used in 4.0?  How is this handled in the new version?

Thanks

Post #7042
Posted 07/06/2005 14:20:57


Support Supremo

Support SupremoSupport SupremoSupport SupremoSupport SupremoSupport SupremoSupport SupremoSupport SupremoSupport Supremo

Group: Customers
Last Login: 13/11/2008 12:44:07
Posts: 568, Visits: 2,507
Birdin (6/2/2005)
Is Session("InstantForum_Skin") also used in 4.0?  How is this handled in the new version?

Thanks

Dear Birdin,

No. In InstantForum 4v the way you can know about the current Skin is:

InstantASP.InstantForum.HttpContext.Current.Current .CurrentSkin()

Post #7156
« Prev Topic | Next Topic »

Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ryan Healey, Mark Christianson, Bare, James Trott

Permissions Expand / Collapse

All times are GMT, Time now is 7:10pm

Powered by InstantForum.NET v4.1.4 © 2009
Execution: 0.047. 10 queries. Compression Disabled.
Home | Products | Purchase | Support | Company | Contact Us
Privacy Statement | © 1999-2007 InstantASP Limited. All Rights Reserved.