Search Results

Search found 2 results on 1 pages for 'bloopy'.

Page 1/1 | 1 

  • Parsing boolean from configuration section in web.config

    - by Bloopy
    I have a custom configuration section in my web.config. One of my classes is grabbing from this: <myConfigSection LabelVisible="" TitleVisible="true"/> I have things working for parsing if I have true or false, however if the attribute is blank I am getting errors. When the config section tries to map the class to the configuration section I get an error of "not a valid value for bool" on the 'LabelVisible' part. How can I parse "" as false in my myConfigSection class? I have tried this: [ConfigurationProperty("labelsVisible", DefaultValue = true, IsRequired = false)] public bool? LabelsVisible { get { return (bool?)this["labelsVisible"]; } But when I try and use what is returned like so: graph.Label.Visible = myConfigSection.LabelsVisible; I get an error of: 'Cannot implicitly convert type 'bool?' to 'bool'. An explicit conversion exists (are you missing a cast?) Thanks for any suggestions!

    Read the article

  • Need to include #anchor after querystring list

    - by Bloopy
    Hello, Form is 'get' to a API which operates off of querystring. One of the parameters is a PackageID which indicates a vacation package. In order for the packageID to appear I also need to append '#packages' to the end of the get request. Since not all form 'get' have a package I need this to be dynamic. I've tried adding a hidden field with '#packages' as the value - however the '#' is automatically encoded and therefore not registered when the server grabs the URL. What would be the best way for me to dynamically include '#packages' as it appears in the querystring via javascript? Thanks!

    Read the article

1