Possible to replace Common.config?

Last post 06-06-2008, 9:49 AM by wigmo. 2 replies.
Sort Posts: Previous Next
  •  06-06-2008, 7:49 AM 41198

    Possible to replace Common.config?

    I would like to replace Common.config with an .aspx page that dynamically generates a config file based on what user is logged into the system we are building (I'd rather not do this via codebehind).  Is there a setting somewhere that I can change so it points to this .aspx file?
  •  06-06-2008, 9:40 AM 41203 in reply to 41198

    Re: Possible to replace Common.config?

    wigmo,
     
    Most settings in Common.config can be dynamically generated.
     
    For example, you can programmatically populate the Code Snippet dropdown. However the whole common.config file cannot be replaced by an aspx page.
     
    Programmatically populate the Code Snippet dropdown:

    C# Example:

    if (!IsPostBack) { 
    CuteEditor.ToolControl toolctrl=Editor1.ToolControls["Codes"];
    if(toolctrl!=null) {
    CuteEditor.RichDropDownList dropdown=(CuteEditor.RichDropDownList)toolctrl.Control;
    //the first item is the caption
    CuteEditor.RichListItem richitem=dropdown.Items[0];
    //clear the items from configuration files
    dropdown.Items.Clear();
    //add the caption
    dropdown.Items.Add(richitem);
    //add text and value
    dropdown.Items.Add("Email signature","<h3>this is my email signature</h3>");
    //add html and text and value
    dropdown.Items.Add("<img border=0 align='absMiddle' src= 'http://cutesoft.net/data/contact.gif'/> Contact us","Contact us","support@cutesoft.net");
    }
    }


    VB Example:

     

    If Not Page.IsPostBack Then
      If Not Editor1.ToolControls("Codes") Is Nothing Then

          Dim dropdown As CuteEditor.RichDropDownList
          Dim richitem As CuteEditor.RichListItem

          dropdown = DirectCast(Editor1.ToolControls("Codes").Control, CuteEditor.RichDropDownList)

          'the first item is the caption
          richitem = dropdown.Items(0)

          'clear the items from configuration files
          dropdown.Items.Clear()

          'add the caption
          dropdown.Items.Add(richitem)

         'add text and value
          dropdown.Items.Add("Email signature","<h3>this is my email signature</h3>")

          'Add html and text and value
          dropdown.Items.Add("<img border=0 align='absMiddle' src= 'http://cutesoft.net/data/contact.gif'/> Contact us", "Contact us", "support@cutesoft.net")

      End If
    End If



    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  06-06-2008, 9:49 AM 41204 in reply to 41203

    Re: Possible to replace Common.config?

    I knew I could do that programmatically, I was just hoping for something a little more flexible.  Thanks.
View as RSS news feed in XML