Search Results

Search found 179 results on 8 pages for 'defaultvalue'.

Page 7/8 | < Previous Page | 3 4 5 6 7 8  | Next Page >

  • iPhone settings not honoured

    - by winsmith
    My iPhone app has the following problem: Freshly installed, when I read out my "Play Sound" preference with the following code: defaults = [NSUserDefaults standardUserDefaults]; NSLog(@"Play Sounds? %d", [defaults boolForKey:@"play_sounds_preference"]); The setting always reads out as false, even though the default setting is set to true. Any ideas? Here is my Root.plist: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>StringsTable</key> <string>Root</string> <key>PreferenceSpecifiers</key> <array> <dict> <key>Type</key> <string>PSGroupSpecifier</string> <key>Title</key> <string>General Settings</string> </dict> <dict> <key>Type</key> <string>PSToggleSwitchSpecifier</string> <key>Title</key> <string>Sounds</string> <key>Key</key> <string>play_sounds_preference</string> <key>DefaultValue</key> <true/> </dict> </array> </dict> </plist> When the user opens the Settings.app and navigates to my app's name, THEN the setting reads out as true, even if the user doesn't change anything.

    Read the article

  • How can I unobtrusively disable submit buttons with Javascript and Prototype?

    - by Frew
    So I found this recommendation, but I can't quite seem to figure out how. This is the code I originally started with: function greySubmits(e) { var value = e.srcElement.defaultValue; // This doesn't work, but it needs to $(e).insert('<input type="hidden" name="commit" value="' + value + '" />'); // This causes IE to not submit at all $$("input[type='submit']").each(function(v) {v.disabled = true;}) } // This works fine Event.observe(window, 'load', function() { $$("input[type='submit']").each(function(e) { Event.observe(e, 'click', greySubmits); }); }); Anyway, I am pretty close, but I can't seem to get any further. Thanks for any help at all! Update: Sorry, I guess I wasn't entirely clear. I'd like to disable all of the submit buttons when someone clicks a submit button. But I do need to send along the value of the submit button so the server knows which button I clicked, hence the insert call. (Note: insert does not create a child of the element you call it on.) And then after disabling the submit buttons I need to call the containing form of the submit buttons submit call, as IE will not submit after you disable the button. Does that make sense?

    Read the article

  • Upgrading SSIS Custom Components for SQL Server 2012

    Having finally got around to upgrading my custom components to SQL Server 2012, I thought I’d share some notes on the process. One of the goals was minimal duplication, so the same code files are used to build the 2008 and 2012 components, I just have a separate project file. The high level steps are listed below, followed by some more details. Create a 2012 copy of the project file Upgrade project, just open the new project file is VS2010 Change target framework to .NET 4.0 Set conditional compilation symbol for DENALI Change any conditional code, including assembly version and UI type name Edit project file to change referenced assemblies for 2012 Change target framework to .NET 4.0 Open the project properties. On the Applications page, change the Target framework to .NET Framework 4. Set conditional compilation symbol for DENALI Re-open the project properties. On the Build tab, first change the Configuration to All Configurations, then set a Conditional compilation symbol of DENALI. Change any conditional code, including assembly version and UI type name The value doesn’t have to be DENALI, it can actually be anything you like, that is just what I use. It is how I control sections of code that vary between versions. There were several API changes between 2005 and 2008, as well as interface name changes. Whilst we don’t have the same issues between 2008 and 2012, I still have some sections of code that do change such as the assembly attributes. #if DENALI [assembly: AssemblyDescription("Data Generator Source for SQL Server Integration Services 2012")] [assembly: AssemblyCopyright("Copyright © 2012 Konesans Ltd")] [assembly: AssemblyVersion("3.0.0.0")] #else [assembly: AssemblyDescription("Data Generator Source for SQL Server Integration Services 2008")] [assembly: AssemblyCopyright("Copyright © 2008 Konesans Ltd")] [assembly: AssemblyVersion("2.0.0.0")] #endif The Visual Studio editor automatically formats the code based on the current compilation symbols, hence in this case the 2008 code is grey to indicate it is disabled. As you can see in the previous example I have distinct assembly version attributes, ensuring I can run both 2008 and 2012 versions of my component side by side. For custom components with a user interface, be sure to update the UITypeName property of the DtsTask or DtsPipelineComponent attributes. As above I use the conditional compilation symbol to control the code. #if DENALI [DtsTask ( DisplayName = "File Watcher Task", Description = "File Watcher Task", IconResource = "Konesans.Dts.Tasks.FileWatcherTask.FileWatcherTask.ico", UITypeName = "Konesans.Dts.Tasks.FileWatcherTask.FileWatcherTaskUI,Konesans.Dts.Tasks.FileWatcherTask,Version=3.0.0.0,Culture=Neutral,PublicKeyToken=b2ab4a111192992b", TaskContact = "File Watcher Task; Konesans Ltd; Copyright © 2012 Konesans Ltd; http://www.konesans.com" )] #else [DtsTask ( DisplayName = "File Watcher Task", Description = "File Watcher Task", IconResource = "Konesans.Dts.Tasks.FileWatcherTask.FileWatcherTask.ico", UITypeName = "Konesans.Dts.Tasks.FileWatcherTask.FileWatcherTaskUI,Konesans.Dts.Tasks.FileWatcherTask,Version=2.0.0.0,Culture=Neutral,PublicKeyToken=b2ab4a111192992b", TaskContact = "File Watcher Task; Konesans Ltd; Copyright © 2004-2008 Konesans Ltd; http://www.konesans.com" )] #endif public sealed class FileWatcherTask: Task, IDTSComponentPersist, IDTSBreakpointSite, IDTSSuspend { // .. code goes on... } Shown below is another example I found that needed changing. I borrow one of the MS editors, and use it against a custom property, but need to ensure I reference the correct version of the MS controls assembly. This section of code is actually shared between the 2005, 2008 and 2012 versions of my component hence it has test for both DENALI and KATMAI symbols. #if DENALI const string multiLineUI = "Microsoft.DataTransformationServices.Controls.ModalMultilineStringEditor, Microsoft.DataTransformationServices.Controls, Version=11.0.00.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"; #elif KATMAI const string multiLineUI = "Microsoft.DataTransformationServices.Controls.ModalMultilineStringEditor, Microsoft.DataTransformationServices.Controls, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"; #else const string multiLineUI = "Microsoft.DataTransformationServices.Controls.ModalMultilineStringEditor, Microsoft.DataTransformationServices.Controls, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"; #endif // Create Match Expression parameter IDTSCustomPropertyCollection100 propertyCollection = outputColumn.CustomPropertyCollection; IDTSCustomProperty100 property = propertyCollection.New(); property = propertyCollection.New(); property.Name = MatchParams.Name; property.Description = MatchParams.Description; property.TypeConverter = typeof(MultilineStringConverter).AssemblyQualifiedName; property.UITypeEditor = multiLineUI; property.Value = MatchParams.DefaultValue; Edit project file to change referenced assemblies for 2012 We now need to edit the project file itself. Open the MyComponente2012.cproj  in you favourite text editor, and then perform a couple of find and replaces as listed below: Find Replace Comment Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91 Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91 Change the assembly references version from SQL Server 2008 to SQL Server 2012. Microsoft SQL Server\100\ Microsoft SQL Server\110\ Change any assembly reference hint path locations from from SQL Server 2008 to SQL Server 2012. If you use any Build Events during development, such as copying the component assembly to the DTS folder, or calling GACUTIL to install it into the GAC, you can also change these now. An example of my new post-build event for a pipeline component is shown below, which uses the .NET 4.0 path for GACUTIL. It also uses the 110 folder location, instead of 100 for SQL Server 2008, but that was covered the the previous find and replace. "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\gacutil.exe" /if "$(TargetPath)" copy "$(TargetPath)" "%ProgramFiles%\Microsoft SQL Server\110\DTS\PipelineComponents" /Y

    Read the article

  • Custom Configuration Section Handlers

    Most .NET developers who need to store something in configuration tend to use appSettings for this purpose, in my experience.  More recently, the framework itself has helped things by adding the <connectionStrings /> section so at least these are in their own section and not adding to the appSettings clutter that pollutes most apps.  I recommend avoiding appSettings for several reasons.  In addition to those listed there, I would add that strong typing and validation are additional reasons to go the custom configuration section route. For my ASP.NET Tips and Tricks talk, I use the following example, which is a simple DemoSettings class that includes two fields.  The first is an integer representing how many attendees there are present for the talk, and the second is the title of the talk.  The setup in web.config is as follows: <configSections> <section name="DemoSettings" type="ASPNETTipsAndTricks.Code.DemoSettings" /> </configSections>   <DemoSettings sessionAttendees="100" title="ASP.NET Tips and Tricks DevConnections Spring 2010" /> Referencing the values in code is strongly typed and straightforward.  Here I have a page that exposes two properties which internally get their values from the configuration section handler: public partial class CustomConfig1 : System.Web.UI.Page { public string SessionTitle { get { return DemoSettings.Settings.Title; } } public int SessionAttendees { get { return DemoSettings.Settings.SessionAttendees; } } } Note that the settings are only read from the config file once after that they are cached so there is no need to be concerned about excessive file access. Now weve seen how to set it up on the config file and how to refer to the settings in code.  All that remains is to see the file itself: public class DemoSettings : ConfigurationSection { private static DemoSettings settings = ConfigurationManager.GetSection("DemoSettings") as DemoSettings; public static DemoSettings Settings{ get { return settings;} }   [ConfigurationProperty("sessionAttendees" , DefaultValue = 200 , IsRequired = false)] [IntegerValidator(MinValue = 1 , MaxValue = 10000)] public int SessionAttendees { get { return (int)this["sessionAttendees"]; } set { this["sessionAttendees"] = value; } }   [ConfigurationProperty("title" , IsRequired = true)] [StringValidator(InvalidCharacters = "~!@#$%^&*()[]{}/;\"|\\")] public string Title { get { return (string)this["title"]; } set { this["title"] = value; }   } } The class is pretty straightforward, but there are some important components to note.  First, it must inherit from System.Configuration.ConfigurationSection.  Next, as a convention I like to have a static settings member that is responsible for pulling out the section when the class is first referenced, and further to expose this collection via a static readonly property, Settings.  Note that the types of both of these are the type of my class, DemoSettings. The properties of the class, SessionAttendees and Title, should map to the attributes of the config element in the XML file.  The [ConfigurationProperty] attribute allows you to map the attribute name to the property name (thus using both XML standard naming conventions and C# naming conventions).  In addition, you can specify a default value to use if nothing is specified in the config file, and whether or not the setting must be provided (IsRequired).  If it is required, then it doesnt make sense to include a default value. Beyond defaults and required, you can specify more advanced validation rules for the configuration values using additional C# attributes, such as [IntegerValidator] and [StringValidator].  Using these, you can declaratively specify that your configuration values be in a given range, or omit certain forbidden characters, for instance.  Of course you can write your own custom validation attributes, and there are others specified in System.Configuration. Individual sections can also be loaded from separate files, using syntax like this: <DemoSettings configSource="demosettings.config" /> Summary Using a custom configuration section handler is not hard.  If your application or component requires configuration, I recommend creating a custom configuration handler dedicated to your app or component.  Doing so will reduce the clutter in appSettings, will provide you with strong typing and validation, and will make it much easier for other developers or system administrators to locate and understand the various configuration values that are necessary for a given application. Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • ASP.NET C# DataList FindControl & Header/Footer template causes error

    - by m3n
    Hello, whenever I use the Header or Footer template of DataList, FindControl is unable to find a label part of the DataList, and throws a NullReferenceException. My SQLDataSource and DataList (no Header and Footer template - works): <asp:SqlDataSource ID="sdsMinaKop" runat="server" ConnectionString="<%$ ConnectionStrings:dbCSMinaKop %>" SelectCommand="SELECT kopare_id, bok_id, bok_titel, bok_pris, kop_id FROM kop WHERE kopare_id = @UserName" onselecting="sdsMinaKop_Selecting"> <SelectParameters> <asp:Parameter DefaultValue="admin" Name="UserName" /> </SelectParameters> <asp:SelectParameters> <asp:Parameter Name="UserName" Type="String" /> </asp:SelectParameters> </asp:SqlDataSource> <asp:DataList ID="DataList1" runat="server" DataKeyField="kop_id" DataSourceID="sdsMinaKop" onitemdatabound="DataList1_ItemDataBound" RepeatLayout="Table"> <ItemTemplate> <tr> <td><asp:Label ID="bok_titelLabel" runat="server" Text='<%# Eval("bok_titel") %>' /></td> <td><asp:Label ID="bok_prisLabel" runat="server" Text='<%# Eval("bok_pris") %>' /> kr</td> <td><a href="avbestall.aspx?id='<%# Eval("kop_id") %>'" />[X]</a></td> </tr> </ItemTemplate> <ItemStyle Wrap="False" /> </asp:DataList> With Header & Footer template - does not work. <asp:DataList ID="DataList1" runat="server" DataKeyField="kop_id" DataSourceID="sdsMinaKop" onitemdatabound="DataList1_ItemDataBound" RepeatLayout="Table"> <ItemTemplate> <tr> <td><asp:Label ID="bok_titelLabel" runat="server" Text='<%# Eval("bok_titel") %>' /></td> <td><asp:Label ID="bok_prisLabel" runat="server" Text='<%# Eval("bok_pris") %>' /> kr</td> <td><a href="avbestall.aspx?id='<%# Eval("kop_id") %>'" />[X]</a></td> </tr> </ItemTemplate> <ItemStyle Wrap="False" /> <HeaderTemplate> a </HeaderTemplate> <FooterTemplate> a </FooterTemplate> </asp:DataList> Selecting event: protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e) { Label pris = (Label)e.Item.FindControl("bok_prisLabel"); LabelTotalt.Text = (Convert.ToDouble(LabelTotalt.Text) + Convert.ToDouble(pris.Text)).ToString(); } Why would this happen? Thanks

    Read the article

  • TypeInitializeException on MVVM pattern

    - by Mohit Deshpande
    System.TypeInitializationException was unhandled Message=The type initializer for 'SmartHomeworkOrganizer.ViewModels.MainViewModel' threw an exception. Source=SmartHomeworkOrganizer TypeName=SmartHomeworkOrganizer.ViewModels.MainViewModel StackTrace: at SmartHomeworkOrganizer.ViewModels.MainViewModel..ctor() at SmartHomeworkOrganizer.App.OnStartup(Object sender, StartupEventArgs e) in C:\Users\Mohit\Documents\Visual Studio 2010\Projects\SmartHomeworkOrganizer\SmartHomeworkOrganizer\App.xaml.cs:line 21 at System.Windows.Application.OnStartup(StartupEventArgs e) at System.Windows.Application.<.ctor>b__0(Object unused) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) at System.Windows.Threading.DispatcherOperation.InvokeImpl() at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state) at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Threading.DispatcherOperation.Invoke() at System.Windows.Threading.Dispatcher.ProcessQueue() at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter) at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) at System.Windows.Threading.Dispatcher.Run() at System.Windows.Application.RunDispatcher(Object ignore) at System.Windows.Application.RunInternal(Window window) at System.Windows.Application.Run(Window window) at System.Windows.Application.Run() at SmartHomeworkOrganizer.App.Main() in C:\Users\Mohit\Documents\Visual Studio 2010\Projects\SmartHomeworkOrganizer\SmartHomeworkOrganizer\obj\Debug\App.g.cs:line 0 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: System.ArgumentException Message=Default value type does not match type of property 'Score'. Source=WindowsBase StackTrace: at System.Windows.DependencyProperty.ValidateDefaultValueCommon(Object defaultValue, Type propertyType, String propertyName, ValidateValueCallback validateValueCallback, Boolean checkThreadAffinity) at System.Windows.DependencyProperty.ValidateMetadataDefaultValue(PropertyMetadata defaultMetadata, Type propertyType, String propertyName, ValidateValueCallback validateValueCallback) at System.Windows.DependencyProperty.RegisterCommon(String name, Type propertyType, Type ownerType, PropertyMetadata defaultMetadata, ValidateValueCallback validateValueCallback) at System.Windows.DependencyProperty.Register(String name, Type propertyType, Type ownerType, PropertyMetadata typeMetadata, ValidateValueCallback validateValueCallback) at System.Windows.DependencyProperty.Register(String name, Type propertyType, Type ownerType, PropertyMetadata typeMetadata) at SmartHomeworkOrganizer.ViewModels.MainViewModel..cctor() in C:\Users\Mohit\Documents\Visual Studio 2010\Projects\SmartHomeworkOrganizer\SmartHomeworkOrganizer\ViewModels\MainViewModel.cs:line 72 InnerException: This bit of code throws a System.ArgumentException before the TypeInitializeException. It says: "Default value type does not match type of property Score": public static readonly DependencyProperty ScoreProperty = DependencyProperty.Register("Score", typeof(float), typeof(MainViewModel), new UIPropertyMetadata(0.0)); Here is the .NET property: public float Score { get { return (float) GetValue(ScoreProperty); } set { SetValue(ScoreProperty, value); } }

    Read the article

  • September 2012 Release of the Ajax Control Toolkit

    - by Stephen.Walther
    I’m excited to announce the September 2012 release of the Ajax Control Toolkit! This is the first release of the Ajax Control Toolkit which supports the .NET 4.5 framework. We also continue to support ASP.NET 3.5 and ASP.NET 4.0. With this release, we’ve made several important bug fixes. The Superexpert team focused on fixing the highest voted issues associated with the CascadingDropDown control. I’ve created a list of these bug fixes later in this blog post. You can download the latest release of the Ajax Control Toolkit by visiting the following page at CodePlex: http://AjaxControlToolkit.CodePlex.com Alternatively, you can install the latest version of the Ajax Control Toolkit using NuGet by firing off the following command from the Package Manager Console: Install-Package AjaxControlToolkit Using the Ajax Control Toolkit with ASP.NET 4.5 Let me walk through the steps for using the Ajax Control Toolkit with ASP.NET 4.5. First, I’ll create a new ASP.NET 4.5 website with Visual Studio 2012. I’ll create the new website with the ASP.NET Web Forms Application template: When you create a new ASP.NET 4.5 site with the ASP.NET Web Forms Application template, you get a starter website. If you run the site, then you get a page with default content: Let me show you how you can add the Ajax Control Toolkit Calendar control to the homepage of this starter site. The first step is to use NuGet to install the Ajax Control Toolkit. Right-click the References folder in the Solution Explorer window and select the menu option Manage NuGet Packages. In the Manage NuGet Packages dialog, use the search box to search for the Ajax Control Toolkit (enter “AjaxControlToolkit”). After you find it, click the Install button to add the Ajax Control Toolkit to your project. That’s all you have to do to install the Ajax Control Toolkit! Now we are ready to start using the Ajax Control Toolkit controls. Open the default.aspx page so we can modify the contents of the page. Erase everything contained in the Content control with the ID of BodyContent. After erasing the content, declare the following two controls: <asp:TextBox ID="vacationDate" runat="server" /> <ajaxToolkit:CalendarExtender TargetControlID="vacationDate" runat="server" /> The first control is a standard ASP.NET TextBox control and the second control is an Ajax Control Toolkit Calendar control. You should get intellisense as you type out the Ajax Control Toolkit Calendar control. If you don’t, then close and re-open the Default.aspx page. Now, let’s run our app. Hit the F5 button or select Debug, Start Debugging from the Visual Studio menu. You will get the error message “MsAjaxBundle is not a valid script name”. Don’t despair! We need to update the Master Page so it uses the ToolkitScriptManager instead of the default ScriptManager. Open the Site.Master file and find where the ScriptManager is declared. The ScriptManager should look like this: <asp:ScriptManager runat="server"> <Scripts> <%--Framework Scripts--%> <asp:ScriptReference Name="MsAjaxBundle" /> <asp:ScriptReference Name="jquery" /> <asp:ScriptReference Name="jquery.ui.combined" /> <asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" /> <asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" /> <asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" /> <asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" /> <asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" /> <asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" /> <asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" /> <asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" /> <asp:ScriptReference Name="WebFormsBundle" /> <%--Site Scripts--%> </Scripts> </asp:ScriptManager> We need to make three changes to the ScriptManager: 1) We need to replace the asp:ScriptManager with the ajaxToolkit:ToolkitScriptManager 2) We need to remove the MsAjaxBundle bundle from the ScriptReferences 3) We need to remove the Assembly=”System.Web” attributes from the ScriptReferences After you make these three changes, the ToolkitScriptManager should looks like this: <ajaxToolkit:ToolkitScriptManager runat="server"> <Scripts> <%--Framework Scripts--%> <asp:ScriptReference Name="jquery" /> <asp:ScriptReference Name="jquery.ui.combined" /> <asp:ScriptReference Name="WebForms.js" Path="~/Scripts/WebForms/WebForms.js" /> <asp:ScriptReference Name="WebUIValidation.js" Path="~/Scripts/WebForms/WebUIValidation.js" /> <asp:ScriptReference Name="MenuStandards.js" Path="~/Scripts/WebForms/MenuStandards.js" /> <asp:ScriptReference Name="GridView.js" Path="~/Scripts/WebForms/GridView.js" /> <asp:ScriptReference Name="DetailsView.js" Path="~/Scripts/WebForms/DetailsView.js" /> <asp:ScriptReference Name="TreeView.js" Path="~/Scripts/WebForms/TreeView.js" /> <asp:ScriptReference Name="WebParts.js" Path="~/Scripts/WebForms/WebParts.js" /> <asp:ScriptReference Name="Focus.js" Path="~/Scripts/WebForms/Focus.js" /> <asp:ScriptReference Name="WebFormsBundle" /> <%--Site Scripts--%> </Scripts> </ajaxToolkit:ToolkitScriptManager> After we make these changes, the app should run successfully. You’ll get a page which contains a text field. When you click inside the text field, a popup calendar is displayed. Ajax Control Toolkit and jQuery You might have noticed that the ScriptManager includes a reference to jQuery by default. We did not remove that reference when we converted the ScriptManager to a ToolkitScriptManager. You can use the Ajax Control Toolkit and jQuery side-by-side. Here’s how you can modify the Default.aspx page so that it contains two popup calendars. The first popup calendar is created with the Ajax Control Toolkit and the second popup calendar is created with jQuery: <asp:TextBox ID="vacationDate" runat="server" /> <ajaxToolkit:CalendarExtender TargetControlID="vacationDate" runat="server" /> <input id="birthDate" /> <script> $("#birthDate").datepicker(); </script> Before you can start using jQuery UI plugins, you need to complete one more step. You need to add the jQuery UI themes bundle to the HEAD of the Site.Master page like this: <head runat="server"> <meta charset="utf-8" /> <title><%: Page.Title %> - My ASP.NET Application</title> <asp:PlaceHolder runat="server"> <%: Scripts.Render("~/bundles/modernizr") %> </asp:PlaceHolder> <webopt:BundleReference runat="server" Path="~/Content/css" /> <webopt:BundleReference runat="server" Path="~/Content/themes/base/css" /> <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" /> <meta name="viewport" content="width=device-width" /> <asp:ContentPlaceHolder runat="server" ID="HeadContent" /> </head> The markup above includes a reference to the jQuery UI themes bundle: <webopt:BundleReference runat="server" Path="~/Content/themes/base/css" /> Now that we have made these changes, we can use the Ajax Control Toolkit and jQuery at the same time. When you run your app, you get two popup calendars. When you click in the first text field, the Ajax Control Toolkit calendar appears. When you click in the second text field, the jQuery UI popup calendar appears: Bug Fixes in this Release We made several important bug fixes with this release of the Ajax Control Toolkit and integrated several Pull Requests contributed by the community. Our primary focus during this sprint was fixing issues with the CascadingDropDown control. We fixed the following issues associated with the CascadingDropDown: · 9490 – Don’t disable dropdowns in CascadingDropDown · 14223 – CascadingDropDown Reset or Setting SelectedValue from WebMethod · 12189 – CascadingDropDown not obeying disabled state of DropDownList · 22942 – CascadingDropDown infinite loop (with solution) · 8671 – CascadingDropdown options is null or undefined · 14407 – CascadingDropDown: populated client event happens too often · 17148 – CascadingDropDown – Add “UseHttpGet” property · 10221 – No NotNull check in CascadingDropDown · 12228 – Provide property for case-insensitive DefaultValue lookup in CascadingDropdown We also fixed the following two issues which are not directly related to the CascadingDropDown control: · 27108 – CalendarExtender: Bug when selecting December shifts to January. · 27041 – Input controls with HTML5 types do not post back in Firefox, Chrome, Safari Finally, we integrated several Pull Requests submitted by the community (Thank you community!): · Added French localized resources for the AjaxFileUpload · Resolved an issue which prevented the AjaxFileUpload control from working with pages that require query string variables. · Extended the AjaxFileUploadEventArgs class to include the current file index in the queue and the total number of files in the queue. · Fixed an issue with TabContainer and TabPanel which caused the OnActiveTabChanged event to fire too often. Summary I’m happy to see the Ajax Control Toolkit move forward into the brave new world of ASP.NET 4.5! In this latest release, we focused on ensuring that the Ajax Control Toolkit works smoothly with ASP.NET 4.5 applications. We also fixed the highest voted bugs associated with the CascadingDropDown control and integrated several Pull Request submitted by the community. Once again, I want to thank the Superexpert team for their hard work on this release!

    Read the article

  • CodePlex Daily Summary for Monday, August 13, 2012

    CodePlex Daily Summary for Monday, August 13, 2012Popular ReleasesDeForm: DeForm v1.0: Initial Version Support for: GaussianBlur effect ConvolveMatrix effect ColorMatrix effect Morphology effectLiteBlog (MVC): LiteBlog 1.31: Features of this release Windows8 styled UI Namespace and code refactoring Resolved the deployment issues in the previous release Added documentation Help file Help file is HTML based built using SandCastle Help file works in all browsers except IE10Self-Tracking Entity Generator for WPF and Silverlight: Self-Tracking Entity Generator v 2.0.0 for VS11: Self-Tracking Entity Generator for WPF and Silverlight v 2.0.0 for Entity Framework 5.0 and Visual Studio 2012Coding4Fun Tools: Coding4Fun.Phone.Toolkit v1.6.0: New Stuff ImageTile Control - think People Tile MicrophoneRecorder - Coding4Fun.Phone.Audio GzipWebClient - Coding4Fun.Phone.Net Serialize - Coding4Fun.Phone.Storage this is code I've written countless times. JSON.net is another alternative ChatBubbleTextBox - Added in Hint TimeSpan languages added: Pl Bug Fixes RoundToggleButton - Enable Visual State not being respected OpacityToggleButton - Enable Visual State not being respected Prompts VS Crash fix for IsPrompt=true More...AssaultCube Reloaded: 2.5.2 Unnamed: Linux has Ubuntu 11.10 32-bit precompiled binaries and Ubuntu 10.10 64-bit precompiled binaries, but you can compile your own as it also contains the source. If you are using Mac or other operating systems, please wait while we try to pack it. Try to compile it. If it fails, download a virtual machine. The server pack is ready for both Windows and Linux, but you might need to compile your own for Linux (source included) Added 3rd person Added mario jumps Fixed nextprimary code exploit ...NPOI: NPOI 2.0: New features a. Implement OpenXml4Net (same as System.Packaging from Microsoft). It supports both .NET 2.0 and .NET 4.0 b. Excel 2007 read/write library (NPOI.XSSF) c. Word 2007 read/write library(NPOI.XWPF) d. NPOI.SS namespace becomes the interface shared between XSSF and HSSF e. Load xlsx template and save as new xlsx file (partially supported) f. Diagonal line in cell both in xls and xlsx g. Support isRightToLeft and setRightToLeft on the common spreadsheet Sheet interface, as per existin...BugNET Issue Tracker: BugNET 1.1: This release includes bug fixes from the 1.0 release for email notifications, RSS feeds, and several other issues. Please see the change log for a full list of changes. http://support.bugnetproject.com/Projects/ReleaseNotes.aspx?pid=1&m=76 Upgrade Notes The following changes to the web.config in the profile section have occurred: Removed <add name="NotificationTypes" type="String" defaultValue="Email" customProviderData="NotificationTypes;nvarchar;255" />Added <add name="ReceiveEmailNotifi...ClosedXML - The easy way to OpenXML: ClosedXML 0.67.0: Conditional formats now accept formulas. Major performance improvement when opening files with merged ranges. Misc fixes.Virtual Keyboard: Virtual Keyboard v2.0 Source Code: This release has a few added keys that were missing in the earlier versions.Visual Rx: V 2.0.20622.9: help will be available at my blog http://blogs.microsoft.co.il/blogs/bnaya/archive/2012/08/12/visual-rx-toc.aspx the SDK is also available though NuGet (search for VisualRx) http://nuget.org/packages/VisualRx if you want to make sure that the Visual Rx Viewer can monitor on your machine, you can install the Visual Rx Tester and run it while the Viewer is running.????: ????2.0.5: 1、?????????????。RiP-Ripper & PG-Ripper: PG-Ripper 1.4.01: changes NEW: Added Support for Clipboard Function in Mono Version NEW: Added Support for "ImgBox.com" links FIXED: "PixHub.eu" links FIXED: "ImgChili.com" links FIXED: Kitty-Kats Forum loginPlayer Framework by Microsoft: Player Framework for Windows 8 (Preview 5): Support for Smooth Streaming SDK beta 2 Support for live playback New bitrate meter and SD/HD indicators Auto smooth streaming track restriction for snapped mode to conserve bandwidth New "Go Live" button and SeekToLive API Support for offset start times Support for Live position unique from end time Support for multiple audio streams (smooth and progressive content) Improved intellisense in JS version Support for Windows 8 RTM ADDITIONAL DOWNLOADSSmooth Streaming Client SD...Media Companion: Media Companion 3.506b: This release includes an update to the XBMC scrapers, for those who prefer to use this method. There were a number of behind-the-scene tweaks to make Media Companion compatible with the new TMDb-V3 API, so it was considered important to get it out to the users to try it out. Please report back any important issues you might find. For this reason, unless you use the XBMC scrapers, there probably isn't any real necessity to download this one! The only other minor change was one to allow the mc...NVorbis: NVorbis v0.3: Fix Ogg page reader to correctly handle "split" packets Fix "zero-energy" packet handling Fix packet reader to always merge packets when needed Add statistics properties to VorbisReader.Stats Add multi-stream API (for Ogg files containing multiple Vorbis streams)System.Net.FtpClient: System.Net.FtpClient 2012.08.08: 2012.08.08 Release. Several changes, see commit notes in source code section. CHM help as well as source for this release are included in the download. Remember that Windows 7 by default (and possibly older versions) will block you from opening the CHM by default due to trust settings. To get around the problem, right click on the CHM, choose properties and click the Un-block button. Please note that this will be the last release tested to compile with the .net 2.0 framework. I will be remov...Isis2 Cloud Computing Library: Isis2 Alpha V1.1.967: This is an alpha pre-release of the August 2012 version of the system. I've been testing and fixing many problems and have also added a new group "lock" API (g.Lock("lock name")/g.Unlock/g.Holder/g.SetLockPolicy); with this, Isis2 can mimic Chubby, Google's locking service. I wouldn't say that the system is entirely stable yet, and I haven't rechecked every single problem I had seen in May/June, but I think it might be good to get some additional use of this release. By now it does seem to...JSON C# Class Generator: JSON CSharp Class Generator 1.3: Support for native JSON.net serializer/deserializer (POCO) New classes layout option: nested classes Better handling of secondary classesAxiom 3D Rendering Engine: v0.8.3376.12322: Changes Since v0.8.3102.12095 ===================================================================== Updated ndoc3 binaries to fix bug Added uninstall.ps1 to nuspec packages fixed revision component in version numbering Fixed sln referencing VS 11 Updated OpenTK Assemblies Added CultureInvarient to numeric parsing Added First Visual Studio 2010 Project Template (DirectX9) Updated SharpInputSystem Assemblies Backported fix for OpenGL Auto-created window not responding to input Fixed freeInterna...DotSpatial: DotSpatial 1.3: This is a Minor Release. See the changes in the issue tracker. Minimal -- includes DotSpatial core and essential extensions Extended -- includes debugging symbols and additional extensions Tutorials are available. Just want to run the software? End user (non-programmer) version available branded as MapWindow Want to add your own feature? Develop a plugin, using the template and contribute to the extension feed (you can also write extensions that you distribute in other ways). Components ...New Projects.NET Weather Component: NET Weather is a component that will allow you to query various weather services for forcasts, current observations, etc..AxisProvider: Axis is a .NET reactive extensions based subscription and publication framework.Blawkay Hockey: Some xna testing i'm doing.Bolt Browser: Browse the web with ease. You'll never meet a browser more simple, friendly and easy to use. Blaze through the web the way it should be. Fast and beautiful.dotHTML: dotHTML provides a .NET-based DOM for HTML and CSS, facilitating code-driven creation of Web data.Fake DbConnection for Unit Testing EF Code: Unit test Entity Framework 4.3+ and confirm you have valid LINQ-to-Entities code without any need for a database connection.FNHMVC: FNHMVC is an architectural foundation for building maintainable web applications with ASP.NET, MVC, NHibernate & Autofac.FreeAgentMobile: FreeAgentMobile is a Windows Phone project intended to provide access to the FreeAgent Accounting application.Lexer: Generate a lexical analyzer (lexer) for a custom grammar by editing a T4 template.LibXmlSocket: XmlSocket LibraryMaxAlarm: This progect i create for my friend Igor.Minecraft Text Splitter: This tool was made to assist you in writing Minecraft books by splitting text into 255-byte pages and auto-copying it for later pasting into Minecraft.MxPlugin: MxPlugin is a project which demonstrates the calling of functions contained in DLLs both statically and dynamically. Parser: Generate a parser for a custom grammar by editing a T4 template.Sliding Boxes Windows Phone Game source code: .SmartSpider: ??????Http???????????,????????、??、???????。techsolittestpro: This project is testting project of codeplexThe Tiff Library - Fast & Simple .Net Tiff Library: The Tiff Library - Fast & Simple .Net Tiff LibraryVirtualizingWrapPanel: testVisual Rx: Visual Rx is a bundle of API and a Viewer which can monitor and visualize Rx datum stream (at run-time).we7T: testWebForms Transverse Library: This projet is aimed to compile best practices in ASP .NET WebForms development as generic tools working with UI components from various origins.

    Read the article

  • CodePlex Daily Summary for Tuesday, August 14, 2012

    CodePlex Daily Summary for Tuesday, August 14, 2012Popular ReleasesMicrosoft Ajax Minifier: Microsoft Ajax Minifier 4.60: Allow for CSS3 grid-column and grid-row repeat syntax. Provide option for -analyze scope-report output to be in XML for easier programmatic processing; also allow for report to be saved to a separate output file.Diablo III Drop Statistics Service: 1.0: Client OnlyClosedXML - The easy way to OpenXML: ClosedXML 0.67.2: v0.67.2 Fix when copying conditional formats with relative formulas v0.67.1 Misc fixes to the conditional formats v0.67.0 Conditional formats now accept formulas. Major performance improvement when opening files with merged ranges. Misc fixes.Umbraco CMS: Umbraco 4.8.1: Whats newBug fixes: Fixed: When upgrading to 4.8.0, the database upgrade didn't run The changes to the <imaging> section in umbracoSettings.config caused errors when you didn't apply them during the upgrade. Defaults will now be used if any keys are missing Scheduled unpublishes now only unpublishes nodes set to published rather than newest Work item: 30937 - Fixed problem with FileHanderData in intranet environment in IE Work item: 3098 - Fix for null exception issue when using 'umbr...MySqlBackup.NET - MySQL Backup Solution for C#, VB.NET, ASP.NET: MySqlBackup.NET 1.4.4 Beta: MySqlBackup.NET 1.4.4 beta Fix bug: If the target database's default character set is not UTF8, UTF8 character will be encoded wrongly during Import. Now, database default character set will be recorded into Dump File at line of "SET NAMES". During import(restore), MySqlBackup will again detect and use the target database default character char set. MySqlBackup.NET 1.4.2 beta Fix bug: MySqlConnection is not closed when AutoCloseConnection set to true after Export or Import completed/halted. M...patterns & practices - Unity: Unity 3.0 for .NET 4.5 and WinRT - Preview: The Unity 3.0.1208.0 Preview enables Unity to work on .NET 4.5 with both the WinRT and desktop profiles. This is an updated version of the port after the .NET Framework 4.5 and Windows 8 have RTM'ed. Please see the Release Notes Providing feedback Post your feedback on the Unity forum Submit and vote on new features for Unity on our Uservoice site.LiteBlog (MVC): LiteBlog 1.31: Features of this release Windows8 styled UI Namespace and code refactoring Resolved the deployment issues in the previous release Added documentation Help file Help file is HTML based built using SandCastle Help file works in all browsers except IE10Self-Tracking Entity Generator for WPF and Silverlight: Self-Tracking Entity Generator v 2.0.0 for VS11: Self-Tracking Entity Generator for WPF and Silverlight v 2.0.0 for Entity Framework 5.0 and Visual Studio 2012Coding4Fun Tools: Coding4Fun.Phone.Toolkit v1.6.0: New Stuff ImageTile Control - think People Tile MicrophoneRecorder - Coding4Fun.Phone.Audio GzipWebClient - Coding4Fun.Phone.Net Serialize - Coding4Fun.Phone.Storage this is code I've written countless times. JSON.net is another alternative ChatBubbleTextBox - Added in Hint TimeSpan languages added: Pl Bug Fixes RoundToggleButton - Enable Visual State not being respected OpacityToggleButton - Enable Visual State not being respected Prompts VS Crash fix for IsPrompt=true More...AssaultCube Reloaded: 2.5.2 Unnamed: Linux has Ubuntu 11.10 32-bit precompiled binaries and Ubuntu 10.10 64-bit precompiled binaries, but you can compile your own as it also contains the source. If you are using Mac or other operating systems, please wait while we try to pack it. Try to compile it. If it fails, download a virtual machine. The server pack is ready for both Windows and Linux, but you might need to compile your own for Linux (source included) Added 3rd person Added mario jumps Fixed nextprimary code exploit ...NPOI: NPOI 2.0: New features a. Implement OpenXml4Net (same as System.Packaging from Microsoft). It supports both .NET 2.0 and .NET 4.0 b. Excel 2007 read/write library (NPOI.XSSF) c. Word 2007 read/write library(NPOI.XWPF) d. NPOI.SS namespace becomes the interface shared between XSSF and HSSF e. Load xlsx template and save as new xlsx file (partially supported) f. Diagonal line in cell both in xls and xlsx g. Support isRightToLeft and setRightToLeft on the common spreadsheet Sheet interface, as per existin...BugNET Issue Tracker: BugNET 1.1: This release includes bug fixes from the 1.0 release for email notifications, RSS feeds, and several other issues. Please see the change log for a full list of changes. http://support.bugnetproject.com/Projects/ReleaseNotes.aspx?pid=1&m=76 Upgrade Notes The following changes to the web.config in the profile section have occurred: Removed <add name="NotificationTypes" type="String" defaultValue="Email" customProviderData="NotificationTypes;nvarchar;255" />Added <add name="ReceiveEmailNotifi...Visual Rx: V 2.0.20622.9: help will be available at my blog http://blogs.microsoft.co.il/blogs/bnaya/archive/2012/08/12/visual-rx-toc.aspx the SDK is also available though NuGet (search for VisualRx) http://nuget.org/packages/VisualRx if you want to make sure that the Visual Rx Viewer can monitor on your machine, you can install the Visual Rx Tester and run it while the Viewer is running.????: ????2.0.5: 1、?????????????。RiP-Ripper & PG-Ripper: PG-Ripper 1.4.01: changes NEW: Added Support for Clipboard Function in Mono Version NEW: Added Support for "ImgBox.com" links FIXED: "PixHub.eu" links FIXED: "ImgChili.com" links FIXED: Kitty-Kats Forum loginPlayer Framework by Microsoft: Player Framework for Windows 8 (Preview 5): Support for Smooth Streaming SDK beta 2 Support for live playback New bitrate meter and SD/HD indicators Auto smooth streaming track restriction for snapped mode to conserve bandwidth New "Go Live" button and SeekToLive API Support for offset start times Support for Live position unique from end time Support for multiple audio streams (smooth and progressive content) Improved intellisense in JS version Support for Windows 8 RTM ADDITIONAL DOWNLOADSSmooth Streaming Client SD...Windows Uninstaller: Windows Uninstaller v1.0: Delete Windows once You click on it. Your Anti Virus may think It is Virus because it delete Windows. Prepare a installation disc of any operating system before uninstall. ---Steps--- 1. Prepare a installation disc of any operating system. 2. Backup your files if needed. (Optional) 3. Run winuninstall.bat . 4. Your Computer will shut down, When Your Computer is shutting down, it is uninstalling Windows. 5. Re-Open your computer and quickly insert the installation disc and install the new ope...WinRT XAML Toolkit: WinRT XAML Toolkit - 1.1.2 (Win 8 RP) - Source: WinRT XAML Toolkit based on the Release Preview SDK. For compiled version use NuGet. From View/Other Windows/Package Manager Console enter: PM> Install-Package winrtxamltoolkit http://nuget.org/packages/winrtxamltoolkit Features Controls Converters Extensions IO helpers VisualTree helpers AsyncUI helpers New since 1.0.2 WatermarkTextBox control ImageButton control updates ImageToggleButton control WriteableBitmap extensions - darken, grayscale Fade in/out method and prope...Media Companion: Media Companion 3.506b: This release includes an update to the XBMC scrapers, for those who prefer to use this method. There were a number of behind-the-scene tweaks to make Media Companion compatible with the new TMDb-V3 API, so it was considered important to get it out to the users to try it out. Please report back any important issues you might find. For this reason, unless you use the XBMC scrapers, there probably isn't any real necessity to download this one! The only other minor change was one to allow the mc...JSON C# Class Generator: JSON CSharp Class Generator 1.3: Support for native JSON.net serializer/deserializer (POCO) New classes layout option: nested classes Better handling of secondary classesNew Projects.NET MSI Install Manager: MSI Install Manager is an API that allows you to install an MSI within a .NET application. You can create a WPF install experience and drive the execution of thArchi Simple: ArchiSimple is a project to create simple house plans.Arduino Installer For Atmel Studio 6: Deploy libraries and project templates to Atmel Studio 6 to allow the creation of Arduino sketches and libraries.BDD Editor: The editor list the text from already created file in the feature folder.Binary Times: Binary TimesCaliburn.Micro.FrameworkContentElement: A library to enable attaching Caliburn.Micro messages to FrameworkContentElement descendant objects. Target platform: WPF.CoinChoue2: .CustomEDMX: Prover *customização* da geração automática de código do EntityFramework, gerando objetos de acordo com os padrões de nomenclatura da equipe de desenvolvimento.DeForm: DeForm is a WinRT component that allows you to apply a pipeline of effects to a picture.DeTaiCS2012_Srmdep: Ð? tài CS nam 2012 v? qu?n lý kinh doanh có di?u ki?nEMSolution: This is only a porject for me, a .net beginner, to practise .net programming skills. SO any suggestion or help is welcome. On going...Facebook SDK Orchard module: Orchard module containing the Facebook C# SDK (http://csharpsdk.org/) for simple installation to an Orchard site.Federation Metadata Signing: This is a console application (to give a feeling as if we are doing something serious on black screen) built using .NET 4 (to signify that we work on latest .neGit-TF: Git-TF is a set of cross-platform, command line tools that facilitate sharing of changes between TFS and Git.mobx.mobi: mobx.mobi - mobile CMS. Good for beginners learning MVC and mobile, or webforms programmer seeking to switch to MVC. Simple and friendly design.PdfExtractor: PdfExtractorSpeed Run: Speed Run for WP7technoschool: Aplikasi sistem informasi sekolah baik SD, SMP maupun SMA. Dimana aplikasi ini telah mencakup akademik, perpustakaan, keuangan, dan kepegawaianThe LogNut logging library and facilities: LogNut is a comprehensive logging facility written in C# for C# developers. It provides a simple way to write something from within your program, as it runs.Visual Studio File Cleanup: Visual Studio File Cleaner Good code examples on how to do a poor man’s obfuscation of your solutionWeatherSpark: Sprarkline-inspired graphs provide a comprehensive view of each day’s temperature, humidity, precipitation, and cloud cover.Windows Phone Interprocess Messaging API: Message passing sample WinLogCheck - Eventlogs Scanner: WinLogCheck is a command line windows eventlogs scanner. The main goal is get a report about the events in the eventlog, except for repetitive events.WinUnleaked Image Uploader: WinUnleaked Image Uploader for WinUnleaked Staff members

    Read the article

  • Adding and accessing custom sections in your C# App.config

    - by deadlydog
    So I recently thought I’d try using the app.config file to specify some data for my application (such as URLs) rather than hard-coding it into my app, which would require a recompile and redeploy of my app if one of our URLs changed.  By using the app.config it allows a user to just open up the .config file that sits beside their .exe file and edit the URLs right there and then re-run the app; no recompiling, no redeployment necessary. I spent a good few hours fighting with the app.config and looking at examples on Google before I was able to get things to work properly.  Most of the examples I found showed you how to pull a value from the app.config if you knew the specific key of the element you wanted to retrieve, but it took me a while to find a way to simply loop through all elements in a section, so I thought I would share my solutions here.   Simple and Easy The easiest way to use the app.config is to use the built-in types, such as NameValueSectionHandler.  For example, if we just wanted to add a list of database server urls to use in my app, we could do this in the app.config file like so: 1: <?xml version="1.0" encoding="utf-8" ?> 2: <configuration> 3: <configSections> 4: <section name="ConnectionManagerDatabaseServers" type="System.Configuration.NameValueSectionHandler" /> 5: </configSections> 6: <startup> 7: <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> 8: </startup> 9: <ConnectionManagerDatabaseServers> 10: <add key="localhost" value="localhost" /> 11: <add key="Dev" value="Dev.MyDomain.local" /> 12: <add key="Test" value="Test.MyDomain.local" /> 13: <add key="Live" value="Prod.MyDomain.com" /> 14: </ConnectionManagerDatabaseServers> 15: </configuration>   And then you can access these values in code like so: 1: string devUrl = string.Empty; 2: var connectionManagerDatabaseServers = ConfigurationManager.GetSection("ConnectionManagerDatabaseServers") as NameValueCollection; 3: if (connectionManagerDatabaseServers != null) 4: { 5: devUrl = connectionManagerDatabaseServers["Dev"].ToString(); 6: }   Sometimes though you don’t know what the keys are going to be and you just want to grab all of the values in that ConnectionManagerDatabaseServers section.  In that case you can get them all like this: 1: // Grab the Environments listed in the App.config and add them to our list. 2: var connectionManagerDatabaseServers = ConfigurationManager.GetSection("ConnectionManagerDatabaseServers") as NameValueCollection; 3: if (connectionManagerDatabaseServers != null) 4: { 5: foreach (var serverKey in connectionManagerDatabaseServers.AllKeys) 6: { 7: string serverValue = connectionManagerDatabaseServers.GetValues(serverKey).FirstOrDefault(); 8: AddDatabaseServer(serverValue); 9: } 10: }   And here we just assume that the AddDatabaseServer() function adds the given string to some list of strings.  So this works great, but what about when we want to bring in more values than just a single string (or technically you could use this to bring in 2 strings, where the “key” could be the other string you want to store; for example, we could have stored the value of the Key as the user-friendly name of the url).   More Advanced (and more complicated) So if you want to bring in more information than a string or two per object in the section, then you can no longer simply use the built-in System.Configuration.NameValueSectionHandler type provided for us.  Instead you have to build your own types.  Here let’s assume that we again want to configure a set of addresses (i.e. urls), but we want to specify some extra info with them, such as the user-friendly name, if they require SSL or not, and a list of security groups that are allowed to save changes made to these endpoints. So let’s start by looking at the app.config: 1: <?xml version="1.0" encoding="utf-8" ?> 2: <configuration> 3: <configSections> 4: <section name="ConnectionManagerDataSection" type="ConnectionManagerUpdater.Data.Configuration.ConnectionManagerDataSection, ConnectionManagerUpdater" /> 5: </configSections> 6: <startup> 7: <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> 8: </startup> 9: <ConnectionManagerDataSection> 10: <ConnectionManagerEndpoints> 11: <add name="Development" address="Dev.MyDomain.local" useSSL="false" /> 12: <add name="Test" address="Test.MyDomain.local" useSSL="true" /> 13: <add name="Live" address="Prod.MyDomain.com" useSSL="true" securityGroupsAllowedToSaveChanges="ConnectionManagerUsers" /> 14: </ConnectionManagerEndpoints> 15: </ConnectionManagerDataSection> 16: </configuration>   The first thing to notice here is that my section is now using the type “ConnectionManagerUpdater.Data.Configuration.ConnectionManagerDataSection” (the fully qualified path to my new class I created) “, ConnectionManagerUpdater” (the name of the assembly my new class is in).  Next, you will also notice an extra layer down in the <ConnectionManagerDataSection> which is the <ConnectionManagerEndpoints> element.  This is a new collection class that I created to hold each of the Endpoint entries that are defined.  Let’s look at that code now: 1: using System; 2: using System.Collections.Generic; 3: using System.Configuration; 4: using System.Linq; 5: using System.Text; 6: using System.Threading.Tasks; 7:  8: namespace ConnectionManagerUpdater.Data.Configuration 9: { 10: public class ConnectionManagerDataSection : ConfigurationSection 11: { 12: /// <summary> 13: /// The name of this section in the app.config. 14: /// </summary> 15: public const string SectionName = "ConnectionManagerDataSection"; 16: 17: private const string EndpointCollectionName = "ConnectionManagerEndpoints"; 18:  19: [ConfigurationProperty(EndpointCollectionName)] 20: [ConfigurationCollection(typeof(ConnectionManagerEndpointsCollection), AddItemName = "add")] 21: public ConnectionManagerEndpointsCollection ConnectionManagerEndpoints { get { return (ConnectionManagerEndpointsCollection)base[EndpointCollectionName]; } } 22: } 23:  24: public class ConnectionManagerEndpointsCollection : ConfigurationElementCollection 25: { 26: protected override ConfigurationElement CreateNewElement() 27: { 28: return new ConnectionManagerEndpointElement(); 29: } 30: 31: protected override object GetElementKey(ConfigurationElement element) 32: { 33: return ((ConnectionManagerEndpointElement)element).Name; 34: } 35: } 36: 37: public class ConnectionManagerEndpointElement : ConfigurationElement 38: { 39: [ConfigurationProperty("name", IsRequired = true)] 40: public string Name 41: { 42: get { return (string)this["name"]; } 43: set { this["name"] = value; } 44: } 45: 46: [ConfigurationProperty("address", IsRequired = true)] 47: public string Address 48: { 49: get { return (string)this["address"]; } 50: set { this["address"] = value; } 51: } 52: 53: [ConfigurationProperty("useSSL", IsRequired = false, DefaultValue = false)] 54: public bool UseSSL 55: { 56: get { return (bool)this["useSSL"]; } 57: set { this["useSSL"] = value; } 58: } 59: 60: [ConfigurationProperty("securityGroupsAllowedToSaveChanges", IsRequired = false)] 61: public string SecurityGroupsAllowedToSaveChanges 62: { 63: get { return (string)this["securityGroupsAllowedToSaveChanges"]; } 64: set { this["securityGroupsAllowedToSaveChanges"] = value; } 65: } 66: } 67: }   So here the first class we declare is the one that appears in the <configSections> element of the app.config.  It is ConnectionManagerDataSection and it inherits from the necessary System.Configuration.ConfigurationSection class.  This class just has one property (other than the expected section name), that basically just says I have a Collection property, which is actually a ConnectionManagerEndpointsCollection, which is the next class defined.  The ConnectionManagerEndpointsCollection class inherits from ConfigurationElementCollection and overrides the requied fields.  The first tells it what type of Element to create when adding a new one (in our case a ConnectionManagerEndpointElement), and a function specifying what property on our ConnectionManagerEndpointElement class is the unique key, which I’ve specified to be the Name field. The last class defined is the actual meat of our elements.  It inherits from ConfigurationElement and specifies the properties of the element (which can then be set in the xml of the App.config).  The “ConfigurationProperty” attribute on each of the properties tells what we expect the name of the property to correspond to in each element in the app.config, as well as some additional information such as if that property is required and what it’s default value should be. Finally, the code to actually access these values would look like this: 1: // Grab the Environments listed in the App.config and add them to our list. 2: var connectionManagerDataSection = ConfigurationManager.GetSection(ConnectionManagerDataSection.SectionName) as ConnectionManagerDataSection; 3: if (connectionManagerDataSection != null) 4: { 5: foreach (ConnectionManagerEndpointElement endpointElement in connectionManagerDataSection.ConnectionManagerEndpoints) 6: { 7: var endpoint = new ConnectionManagerEndpoint() { Name = endpointElement.Name, ServerInfo = new ConnectionManagerServerInfo() { Address = endpointElement.Address, UseSSL = endpointElement.UseSSL, SecurityGroupsAllowedToSaveChanges = endpointElement.SecurityGroupsAllowedToSaveChanges.Split(',').Where(e => !string.IsNullOrWhiteSpace(e)).ToList() } }; 8: AddEndpoint(endpoint); 9: } 10: } This looks very similar to what we had before in the “simple” example.  The main points of interest are that we cast the section as ConnectionManagerDataSection (which is the class we defined for our section) and then iterate over the endpoints collection using the ConnectionManagerEndpoints property we created in the ConnectionManagerDataSection class.   Also, some other helpful resources around using app.config that I found (and for parts that I didn’t really explain in this article) are: How do you use sections in C# 4.0 app.config? (Stack Overflow) <== Shows how to use Section Groups as well, which is something that I did not cover here, but might be of interest to you. How to: Create Custom Configuration Sections Using Configuration Section (MSDN) ConfigurationSection Class (MSDN) ConfigurationCollectionAttribute Class (MSDN) ConfigurationElementCollection Class (MSDN)   I hope you find this helpful.  Feel free to leave a comment.  Happy Coding!

    Read the article

  • CodePlex Daily Summary for Sunday, August 12, 2012

    CodePlex Daily Summary for Sunday, August 12, 2012Popular ReleasesThisismyusername's codeplex page.: Run! Thunderstorm! Classic Multiplatform: The classic edition now on any device, you don't have to get the touch edition for touch screens!SharePoint Developers & Admins: SPTaxCleaner Tool - Cleaner Taxonomy Data: For more information on the tool and how to use it: SPTaxCleaner Run the tool at your own risk!BugNET Issue Tracker: BugNET 1.1: This release includes bug fixes from the 1.0 release for email notifications, RSS feeds, and several other issues. Please see the change log for a full list of changes. http://support.bugnetproject.com/Projects/ReleaseNotes.aspx?pid=1&m=76 Upgrade Notes The following changes to the web.config in the profile section have occurred: Removed <add name="NotificationTypes" type="String" defaultValue="Email" customProviderData="NotificationTypes;nvarchar;255" />Added <add name="ReceiveEmailNotifi...Virtual Keyboard: Virtual Keyboard v2.0 Source Code: This release has a few added keys that were missing in the earlier versions.????: ????2.0.5: 1、?????????????。RiP-Ripper & PG-Ripper: PG-Ripper 1.4.01: changes NEW: Added Support for Clipboard Function in Mono Version NEW: Added Support for "ImgBox.com" links FIXED: "PixHub.eu" links FIXED: "ImgChili.com" links FIXED: Kitty-Kats Forum loginPlayer Framework by Microsoft: Player Framework for Windows 8 (Preview 5): Support for Smooth Streaming SDK beta 2 Support for live playback New bitrate meter and SD/HD indicators Auto smooth streaming track restriction for snapped mode to conserve bandwidth New "Go Live" button and SeekToLive API Support for offset start times Support for Live position unique from end time Support for multiple audio streams (smooth and progressive content) Improved intellisense in JS version Support for Windows 8 RTM ADDITIONAL DOWNLOADSSmooth Streaming Client SD...Media Companion: Media Companion 3.506b: This release includes an update to the XBMC scrapers, for those who prefer to use this method. There were a number of behind-the-scene tweaks to make Media Companion compatible with the new TMDb-V3 API, so it was considered important to get it out to the users to try it out. Please report back any important issues you might find. For this reason, unless you use the XBMC scrapers, there probably isn't any real necessity to download this one! The only other minor change was one to allow the mc...Avian Mortality Detection Entry Application: Detection Entry: The most recent and up-to-date version of the Detection Entry application. Please click on the CLICKONCE link above to install.NVorbis: NVorbis v0.3: Fix Ogg page reader to correctly handle "split" packets Fix "zero-energy" packet handling Fix packet reader to always merge packets when needed Add statistics properties to VorbisReader.Stats Add multi-stream API (for Ogg files containing multiple Vorbis streams)The Ftp Library - Most simple, full-featured .NET Ftp Library: TheFtpLibrary v1.0: First version. Please report any bug and discuss how to improve this library in 'Discussion' section.VisioAutomation: Visio Power Tools 2010 (Beta): Visio Power Tools 2010 An Add-in for Visio 2010. In Beta but should be very stable. Some Cool Features Import Colors - From Kuler, ColourLovers, or manually enter RGB values Create a Document containing images of all masters in multiple stencils Toggle text case Copy All text from all shapes Export document to XHTML (with embedded SVG) Export document to XAML Updates2012-08-10 - Fixed path handling when generating the HTML stencil catalogXBMC for LCDSmartie: v 0.7.1: Changes: Version 0.7.1 - Removed unused configuration options: You can remove the user and pass section from your LCDSmartie.exe.config Version 0.7.0 - Changed JSON-Protocol to TCP: This means the plugin will run much faster and chances that LCDSmartie will stutter are minimized Note: You will have to change some settings in your LCDSmartie.exe.config, as TCP uses a different port than HTTP (9090 is default in XBMC)WPF RSS Feed Reader: WPF RSS Feed Reader 4.1: WPF RSS Feed Reader 4.1.x This application has been developed using Visual Studio 2010 with .NET 4.0 and Microsoft Expression Blend. It makes use of the MVVM Light Toolkit, more information can be found here Fixed bug when first installed - handle null reference on _proxySetting Fixed bug if trying to open error log but error log doesn't exist yet Added strings to resources Moved AsssemblyInfo centrally and linked to other projectsScutex: Scutex 4th Preview Release 0.4: This is the fourth preview release for the new Scutex 0.4 Beta. This preview release is unstable and contains some UI issues that are being worked on due to an installation of a brand new GUI. The stable version of the 0.4 Beta will be out shortly as soon as this release passes QA. The following were fixed in this release *Fixed an issue with the Upload Product dialog that would cause it to throw an exception. Known Issues *The download service logs grid does not display properlySystem.Net.FtpClient: System.Net.FtpClient 2012.08.08: 2012.08.08 Release. Several changes, see commit notes in source code section. CHM help as well as source for this release are included in the download. Remember that Windows 7 by default (and possibly older versions) will block you from opening the CHM by default due to trust settings. To get around the problem, right click on the CHM, choose properties and click the Un-block button. Please note that this will be the last release tested to compile with the .net 2.0 framework. I will be remov...Isis2 Cloud Computing Library: Isis2 Alpha V1.1.967: This is an alpha pre-release of the August 2012 version of the system. I've been testing and fixing many problems and have also added a new group "lock" API (g.Lock("lock name")/g.Unlock/g.Holder/g.SetLockPolicy); with this, Isis2 can mimic Chubby, Google's locking service. I wouldn't say that the system is entirely stable yet, and I haven't rechecked every single problem I had seen in May/June, but I think it might be good to get some additional use of this release. By now it does seem to...JSON C# Class Generator: JSON CSharp Class Generator 1.3: Support for native JSON.net serializer/deserializer (POCO) New classes layout option: nested classes Better handling of secondary classesAxiom 3D Rendering Engine: v0.8.3376.12322: Changes Since v0.8.3102.12095 ===================================================================== Updated ndoc3 binaries to fix bug Added uninstall.ps1 to nuspec packages fixed revision component in version numbering Fixed sln referencing VS 11 Updated OpenTK Assemblies Added CultureInvarient to numeric parsing Added First Visual Studio 2010 Project Template (DirectX9) Updated SharpInputSystem Assemblies Backported fix for OpenGL Auto-created window not responding to input Fixed freeInterna...DotSpatial: DotSpatial 1.3: This is a Minor Release. See the changes in the issue tracker. Minimal -- includes DotSpatial core and essential extensions Extended -- includes debugging symbols and additional extensions Tutorials are available. Just want to run the software? End user (non-programmer) version available branded as MapWindow Want to add your own feature? Develop a plugin, using the template and contribute to the extension feed (you can also write extensions that you distribute in other ways). Components ...New ProjectsAppFabric Cache Admin Tool: Appfabric Admin tool is a GUI tool provided for Cache Administration. This tool can be used for both Appfabric 1.0 and 1.1 versions.Bootstrap XML Navigation: Bootstrap XML Navigation is an ASP.NET Server Control which provide the ability to off-load your Bootstrap navigation structure to external XML files.Classic MVC: Classic MVC is an MVC framework written entirely in JScript for Microsoft's Classic ASP. Separation of concerns, controllers, partial views and more.Component Spectrum: Component Spectrum is an E-Commerce Application project.Developments in Java: Free Develop JavaDongGPrj: DongGPrjEsShop: ???????,????。。。F# Indent Visual Studio addon: The addon to show how to use SmartIndent and change the indent behavior in F# content.FizzBuzzAssignment: This is HeadSpring assignment.hotfighter: a act game!!!iSoilHotel: It is a hotel management system that using Microsoft N-Layer Architecture as the primary thoughts.KVBL (K's VB6 library) VB6????,????????.: KVBL??VB6??????、???????,????????,??????,????VB????,??????????。????:??????、???、??、????、??、????、??、??、?????、?????、???????,???????……Meteorite: c# game 3d wp7 space ship meteoriteMetro App Helpers: Helper classes for building Metro style app on Windows 8.MobileShop: Mobile shop for Iphone & AndroidMomentum: this is q project pqrticipqtion between meir and david concerning student university project on physics.OneLine: dfgfdgPreflight: Summary HereResilient FileSystemWatcher for monitoring network folders: Drop in replacement for FileSystemWatcher that works for network folders and compensate for network outages, server restarts ect.SkyPoint: A Windows Phone 7 app aimed at novice astronomers.test20120811: summary of this projectVS Unbind Source Control: Remove Source Control bindings from Visual Studio Solution and Project FilesWcf SWA (SFTI) implementation: First releasewebstart: new web tech testwinform_framework: winform_frameworkwtopenapi: wtopen sina weibo sdk txweibosdk qzone sdk

    Read the article

  • CodePlex Daily Summary for Wednesday, August 15, 2012

    CodePlex Daily Summary for Wednesday, August 15, 2012Popular ReleasesTFS Workbench: TFS Workbench v2.2.0.10: Compiled installers for TFS Workbench 2.2.0.10 Bug Fix Fixed bug that stopped the change workspace action from working.MoltenMercury: MoltenMercury 1.0 beta 1: This is initial implementation of the MoltenMercury with everything running but not throughoutly tested. Release contains a zip file with program binaries and a zip file containing resources. Before using please create a new directory named data in the same directory with program executables and extract DefaultCharacter zip file in there. If you have ???????????, you can simply place executables into the same directory with the program mentioned above. MoltenMercury supports character resour...SharePoint Column & View Permission: SharePoint Column and View Permission v1.0: Version 1.0 of this project. If you will find any bugs please let me know at enti@zoznam.sk or post your findings in Issue TrackerSPListViewFilter: Version 1.6: Layout selection: http://blog.vitalyzhukov.ru/imagelibrary/120815/Settings_Layouts.pngConsoleHoster: ConsoleHoster Version 1.2: Cleanup some logging UI impreovements: Fixed the bug with _ character in project-name Fixed the bug with tab close button to be X style Fixed the style of search content bar Fixed the bug with disappearing Edit project window Moved the Clear History button to the taskbar and added also a menu item Changed the QC button to CH Applied project colors to tab headersMicrosoft Ajax Minifier: Microsoft Ajax Minifier 4.60: Allow for CSS3 grid-column and grid-row repeat syntax. Provide option for -analyze scope-report output to be in XML for easier programmatic processing; also allow for report to be saved to a separate output file.Diablo III Drop Statistics Service: 1.0: Client OnlyClosedXML - The easy way to OpenXML: ClosedXML 0.67.2: v0.67.2 Fix when copying conditional formats with relative formulas v0.67.1 Misc fixes to the conditional formats v0.67.0 Conditional formats now accept formulas. Major performance improvement when opening files with merged ranges. Misc fixes.Umbraco CMS: Umbraco 4.8.1: Whats newBug fixes: Fixed: When upgrading to 4.8.0, the database upgrade didn't run Update: unfortunately, upgrading with SQLCE is problematic, there's a workaround here: http://bit.ly/TEmMJN The changes to the <imaging> section in umbracoSettings.config caused errors when you didn't apply them during the upgrade. Defaults will now be used if any keys are missing Scheduled unpublishes now only unpublishes nodes set to published rather than newest Work item: 30937 - Fixed problem with Fi...MySqlBackup.NET - MySQL Backup Solution for C#, VB.NET, ASP.NET: MySqlBackup.NET 1.4.4 Beta: MySqlBackup.NET 1.4.4 beta Fix bug: If the target database's default character set is not UTF8, UTF8 character will be encoded wrongly during Import. Now, database default character set will be recorded into Dump File at line of "SET NAMES". During import(restore), MySqlBackup will again detect and use the target database default character char set. MySqlBackup.NET 1.4.2 beta Fix bug: MySqlConnection is not closed when AutoCloseConnection set to true after Export or Import completed/halted. M...patterns & practices - Unity: Unity 3.0 for .NET 4.5 and WinRT - Preview: The Unity 3.0.1208.0 Preview enables Unity to work on .NET 4.5 with both the WinRT and desktop profiles. This is an updated version of the port after the .NET Framework 4.5 and Windows 8 have RTM'ed. Please see the Release Notes Providing feedback Post your feedback on the Unity forum Submit and vote on new features for Unity on our Uservoice site.LiteBlog (MVC): LiteBlog 1.31: Features of this release Windows8 styled UI Namespace and code refactoring Resolved the deployment issues in the previous release Added documentation Help file Help file is HTML based built using SandCastle Help file works in all browsers except IE10Self-Tracking Entity Generator for WPF and Silverlight: Self-Tracking Entity Generator v 2.0.0 for VS11: Self-Tracking Entity Generator for WPF and Silverlight v 2.0.0 for Entity Framework 5.0 and Visual Studio 2012Coding4Fun Tools: Coding4Fun.Phone.Toolkit v1.6.0: New Stuff ImageTile Control - think People Tile MicrophoneRecorder - Coding4Fun.Phone.Audio GzipWebClient - Coding4Fun.Phone.Net Serialize - Coding4Fun.Phone.Storage this is code I've written countless times. JSON.net is another alternative ChatBubbleTextBox - Added in Hint TimeSpan languages added: Pl Bug Fixes RoundToggleButton - Enable Visual State not being respected OpacityToggleButton - Enable Visual State not being respected Prompts VS Crash fix for IsPrompt=true More...AssaultCube Reloaded: 2.5.2 Unnamed: Linux has Ubuntu 11.10 32-bit precompiled binaries and Ubuntu 10.10 64-bit precompiled binaries, but you can compile your own as it also contains the source. If you are using Mac or other operating systems, please wait while we try to pack it. Try to compile it. If it fails, download a virtual machine. The server pack is ready for both Windows and Linux, but you might need to compile your own for Linux (source included) Added 3rd person Added mario jumps Fixed nextprimary code exploit ...NPOI: NPOI 2.0: New features a. Implement OpenXml4Net (same as System.Packaging from Microsoft). It supports both .NET 2.0 and .NET 4.0 b. Excel 2007 read/write library (NPOI.XSSF) c. Word 2007 read/write library(NPOI.XWPF) d. NPOI.SS namespace becomes the interface shared between XSSF and HSSF e. Load xlsx template and save as new xlsx file (partially supported) f. Diagonal line in cell both in xls and xlsx g. Support isRightToLeft and setRightToLeft on the common spreadsheet Sheet interface, as per existin...BugNET Issue Tracker: BugNET 1.1: This release includes bug fixes from the 1.0 release for email notifications, RSS feeds, and several other issues. Please see the change log for a full list of changes. http://support.bugnetproject.com/Projects/ReleaseNotes.aspx?pid=1&m=76 Upgrade Notes The following changes to the web.config in the profile section have occurred: Removed <add name="NotificationTypes" type="String" defaultValue="Email" customProviderData="NotificationTypes;nvarchar;255" />Added <add name="ReceiveEmailNotifi...????: ????2.0.5: 1、?????????????。RiP-Ripper & PG-Ripper: PG-Ripper 1.4.01: changes NEW: Added Support for Clipboard Function in Mono Version NEW: Added Support for "ImgBox.com" links FIXED: "PixHub.eu" links FIXED: "ImgChili.com" links FIXED: Kitty-Kats Forum loginPlayer Framework by Microsoft: Player Framework for Windows 8 (Preview 5): Support for Smooth Streaming SDK beta 2 Support for live playback New bitrate meter and SD/HD indicators Auto smooth streaming track restriction for snapped mode to conserve bandwidth New "Go Live" button and SeekToLive API Support for offset start times Support for Live position unique from end time Support for multiple audio streams (smooth and progressive content) Improved intellisense in JS version Support for Windows 8 RTM ADDITIONAL DOWNLOADSSmooth Streaming Client SD...New ProjectsA Java Open Platform: A Java Open PlatformAutomation Tools: noneAzManPermissions: Allows AzMan (Authorization Manager) operation permission checks declaratively and imperatively. It can connect to AzMan stores directly or through a service.Configuration Manager 2012 Automation: Configuration Manager 2012 Automation is a powershell project to help perform the basic implementation of a CM12 infrastructure...Dynamicweb Blog Engine 2012: A simple blog engine built on Dynamicweb.E Lixo: Projeto E_LIXOEasy Windows Service Manager: Easy Windows Service Manager (ewsm) is a desktop utility that enables the easily management of Windows services. flexwork: A Flex Pluggable Extension FrameworkGit On Codeplex: Just trying git on CodePlexGT.BlogBox: Blogsite-Webtemplate for SharePoint 2010gvPoco: gvPoco is a .NET class library for the Google Visualization Charts API. IAllenSoft: IAllenSoft is a silverlight control library, which originates from some idea. Its target is to improve development productivity for silverlight projects. ListNetRanker: ListNetRanker is a listwise ranker based on machine learning. Given documents and query's feature set, ListNetRanker will rank these documents by ranking score.lvyao: stillMetro Tic-Tac-Toe: Tic-Tac-Toe is a Windows 8 developed using MonoGame for Windows 8. The intent of this code is to help XNA developers with porting their XNA apps to Windows 8myProject: my private code Nintemulator: Nintemulator is a work in progress multi-system emulator. Plans for emulated systems are NES, SNES, GB/GBC, GBA.Picnic Game: Picnic Game is a 2D game written in Small Basic. The objective is to get the pizza to the basket before you get stung or time runs out.Picnic Level Editor: Picnic Game is a 2D 3rd person game where you are an ant, and you have to gather the pizza and bring it to the basket before you get stung by a bee.ResCom: ResCom is a community response system for Windows Phone 8Scalable Object Persistence (SOP) Framework: Scalable object persistence (SOP) framework. RDBMS "index" like performance and scale on data Stores but without the unnecessary baggage, fine grained control.self-balancing-avl-tree: Self balancing AVL tree with Concat and Split operations.SEMS(synthetical evaluation management system): that's itsergionadal-mvc: Mvc para sistemas AndroidTFS Test Plan Builder: TFS Test plan builder is a tool to assis users of Microst Test Manager to build new test plans then moving from sprint to sprint or release to release The Excel Library: DExcelLibrary is a project that allows you to load and display "any" excel file given a specificaction of with areas/grids to loadTimePunch Metro Wpf Library: This library contains WPF controls and MVVM Implementation to create touch optimized applications in the new Windows 8 UI style formerly known as "Metro". UniPie: UniPie is a system wide pie menu system for sending key-mouse button combinations to certain applications. It can also convert one combo to another.xref: This is an extension of the classic FizzBuzz problem.ZombieRPG: Basic Zombie RPG game made using Game Maker??????: ZHJP

    Read the article

  • using PixelBender to double the size of a bitmap

    - by jedierikb
    I have a performance question about pixel bender. I want to enlarge many BitmapData (double their size into new BitmapData). I was doing this with as3, but wanted to use pixel bender to get better performance. On my machines, I get great comparative performance out of many pixel bender demonstrations. To my surprise (or bad coding / understanding), I am getting much worse performance out of pixel bender -- 2 seconds to do 3000 scalings vs .5 seconds! I expected to get at least the same performance as as3. What am I doing wrong? I got the straightforward pixel bender code here (and it is included below for easy reference). package { import aCore.aUtil.timingUtils; import flash.display.BitmapData; import flash.display.Shader; import flash.display.ShaderJob; import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; import flash.geom.Matrix; public class flashFlash extends Sprite { [Embed ( source="pixelbender/bilinearresample.pbj", mimeType="application/octet-stream" ) ] private static var BilinearScaling:Class; public function flashFlash( ):void { stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; addEventListener( Event.ENTER_FRAME, efCb, false, 0, true ); } private function efCb( evt:Event ):void { removeEventListener( Event.ENTER_FRAME, efCb, false ); traceTime( "init" ); var srcBmd:BitmapData = new BitmapData( 80, 120, false, 0 ); var destBmd:BitmapData = new BitmapData( 160, 240, false, 0 ); var mx:Matrix = new Matrix( ); mx.scale( 2, 2 ); for (var i:uint = 0; i < 3000; i++) { destBmd.draw( srcBmd, mx ); } traceTime( "scaled with as3" ); // create and configure a Shader object var shader:Shader = new Shader( ); shader.byteCode = new BilinearScaling( ); shader.data.scale.value = [2]; shader.data.src.input = srcBmd; for (var j:uint = 0; j < 3000; j++) { var shaderJob:ShaderJob = new ShaderJob( ); shaderJob.shader = shader; shaderJob.target = destBmd; shaderJob.start( true ); } traceTime( "scaled with pixel bender bilinearresample.pbj" ); } private static var _lastTraceTime:Number = new Date().getTime(); public static function traceTime( note:String ):Number { var nowTime:Number = new Date().getTime(); var diff:Number = (nowTime-_lastTraceTime); trace( "[t" + diff + "] " + note ); _lastTraceTime = nowTime; return diff; } } } And the pixel bender code: <languageVersion : 1.0;> kernel BilinearResample < namespace : "com.brooksandrus.pixelbender"; vendor : "Brooks Andrus"; version : 1; description : "Resizes an image using bilinear resampling. Constrains aspect ratio - divide Math.max( input.width / output.width, input.height / output.height ) and pass in to the scale parameter"; > { parameter float scale < minValue: 0.0; maxValue: 1000.0; defaultValue: 1.0; >; input image4 src; output pixel4 dst; void evaluatePixel() { // scale should be Math.max( src.width / output.width, src.height / output.height ) dst = sampleLinear( src, outCoord() * scale ); // bilinear scaling } }

    Read the article

  • Two-way databinding of a custom templated control. Eval works, but not Bind.

    - by Jason
    I hate long code snippets and I'm sorry about this one, but it turns out that this asp.net stuff can't get much shorter and it's so specific that I haven't been able to generalize it without a full code listing. I just want simple two-way, declarative databinding to a single instance of an object. Not a list of objects of a type with a bunch of NotImplementedExceptions for Add, Delete, and Select, but just a single view-state persisted object. This is certainly something that can be done but I've struggled with an implementation for years. This newest, closest implementation was inspired by this article from 4-Guys-From-Rolla, http://msdn.microsoft.com/en-us/library/aa478964.aspx. Unfortunately, after implementing, I'm getting the following error and I don't know what I'm missing: System.InvalidOperationException: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control. If I don't use Bind(), and only use Eval() functionality, it works. In that way, the error is especially confusing. Here's the simplified codeset that still produces the error: using System.ComponentModel; namespace System.Web.UI.WebControls.Special { public class SampleFormData { public string SampleString = "Sample String Data"; public int SampleInt = -1; } [ToolboxItem(false)] public class SampleSpecificFormDataContainer : WebControl, INamingContainer { SampleSpecificEntryForm entryForm; internal SampleSpecificEntryForm EntryForm { get { return entryForm; } } [Bindable(true), Category("Data")] public string SampleString { get { return entryForm.FormData.SampleString; } set { entryForm.FormData.SampleString = value; } } [Bindable(true), Category("Data")] public int SampleInt { get { return entryForm.FormData.SampleInt; } set { entryForm.FormData.SampleInt = value; } } internal SampleSpecificFormDataContainer(SampleSpecificEntryForm entryForm) { this.entryForm = entryForm; } } public class SampleSpecificEntryForm : WebControl, INamingContainer { #region Template private IBindableTemplate formTemplate = null; [Browsable(false), DefaultValue(null), TemplateContainer(typeof(SampleSpecificFormDataContainer), ComponentModel.BindingDirection.TwoWay), PersistenceMode(PersistenceMode.InnerProperty)] public virtual IBindableTemplate FormTemplate { get { return formTemplate; } set { formTemplate = value; } } #endregion #region Viewstate SampleFormData FormDataVS { get { return (ViewState["FormData"] as SampleFormData) ?? new SampleFormData(); } set { ViewState["FormData"] = value; SaveViewState(); } } #endregion public override ControlCollection Controls { get { EnsureChildControls(); return base.Controls; } } private SampleSpecificFormDataContainer formDataContainer = null; [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public SampleSpecificFormDataContainer FormDataContainer { get { EnsureChildControls(); return formDataContainer; } } [Bindable(true), Browsable(false)] public SampleFormData FormData { get { return FormDataVS; } set { FormDataVS = value; } } protected override void CreateChildControls() { if (!this.ChildControlsCreated) { Controls.Clear(); formDataContainer = new SampleSpecificFormDataContainer(this); Controls.Add(formDataContainer); FormTemplate.InstantiateIn(formDataContainer); this.ChildControlsCreated = true; } } public override void DataBind() { CreateChildControls(); base.DataBind(); } } } With an ASP.NET page the following: <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="Default2.aspx.cs" Inherits="EntryFormTest._Default2" EnableEventValidation="false" %> <%@ Register Assembly="EntryForm" Namespace="System.Web.UI.WebControls.Special" TagPrefix="cc1" %> <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> </asp:Content> <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <h2> Welcome to ASP.NET! </h2> <cc1:SampleSpecificEntryForm ID="EntryForm1" runat="server"> <FormTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("SampleString") %>'></asp:TextBox><br /> <h3>(<%# Container.SampleString %>)</h3><br /> <asp:Button ID="Button1" runat="server" Text="Button" /> </FormTemplate> </cc1:SampleSpecificEntryForm> </asp:Content> Default2.aspx.cs using System; namespace EntryFormTest { public partial class _Default2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { EntryForm1.DataBind(); } } } Thanks for any help!

    Read the article

  • Gridview delete/edit not working when using select parameter

    - by Brian Carroll
    new to ASP.NET. I created a sqldatasource and set up basic select query (SELECT * FROM Accounts) using the wizard. I then had the sqldatasource wizard create the INSERT, EDIT and DELETE queries. Connected this datasource to a gridview with EDITING and DELETING enabled. Everything works fine. The SELECT query returns all records and I can edit/delete them. Now I need to send a parameter to the SELECT command to filter the records to those with the user's id (pulled from Membership.GetUser). When I add this parameter, the SELECT command works fine, but the EDIT/DELETE buttons in the gridview no longer work. No error is generated. The page refreshes but the records were not updated in the database. I don't understand what is wrong. CODE: <% Dim u As MembershipUser Dim userid As String u = Membership.GetUser(User.Identity.Name) userid = u.ProviderUserKey.ToString SqlDataSource1.SelectParameters("UserId").DefaultValue = userid %> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1"> <Columns> <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" /> <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" /> <asp:BoundField DataField="UserId" HeaderText="UserId" SortExpression="UserId" /> <asp:BoundField DataField="AccountName" HeaderText="AccountName" SortExpression="AccountName" /> <asp:BoundField DataField="DateAdded" HeaderText="DateAdded" SortExpression="DateAdded" /> <asp:BoundField DataField="LastModified" HeaderText="LastModified" SortExpression="LastModified" /> </Columns> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CheckingConnectionString %>" DeleteCommand="DELETE FROM [Accounts] WHERE [ID] = @ID" InsertCommand="INSERT INTO [Accounts] ([UserId], [AccountName], [DateAdded], [LastModified]) VALUES (@UserId, @AccountName, @DateAdded, @LastModified)" SelectCommand="SELECT * FROM [Accounts] WHERE [UserId] = @UserId" UpdateCommand="UPDATE [Accounts] SET [UserId] = @UserId, [AccountName] = @AccountName, [DateAdded] = @DateAdded, [LastModified] = @LastModified WHERE [ID] = @ID"> <DeleteParameters> <asp:Parameter Name="ID" Type="Int32" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="UserId" Type="String" /> <asp:Parameter Name="AccountName" Type="String" /> <asp:Parameter Name="DateAdded" Type="DateTime" /> <asp:Parameter Name="LastModified" Type="DateTime" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="UserId" Type="String" /> <asp:Parameter Name="AccountName" Type="String" /> <asp:Parameter Name="DateAdded" Type="DateTime" /> <asp:Parameter Name="LastModified" Type="DateTime" /> <asp:Parameter Name="ID" Type="Int32" /> </UpdateParameters> <SelectParameters> <asp:Parameter Name="UserId"/> </SelectParameters> </asp:SqlDataSource>

    Read the article

  • StoreGeneratedPattern T4 EntityFramework concern

    - by LoganWolfer
    Hi everyone, Here's the situation : I use SQL Server 2008 R2, SQL Replication, Visual Studio 2010, EntityFramework 4, C# 4. The course-of-action from our DBA is to use a rowguid column for SQL Replication to work with our setup. These columns need to have a StoreGeneratedPattern property set to Computed on every one of these columns. The problem : Every time the T4 template regenerate our EDMX (ADO.NET Entity Data Model) file (for example, when we update it from our database), I need to go manually in the EDMX XML file to add this property to every one of them. It has to go from this : <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" /> To this : <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" StoreGeneratedPattern="Computed"/> The solution : I'm trying to find a way to customize an ADO.NET EntityObject Generator T4 file to generate a StoreGeneratedPattern="Computed" to every rowguid that I have. I'm fairly new to T4, I only did customization to AddView and AddController T4 templates for ASP.NET MVC 2, like List.tt for example. I've looked through the EF T4 file, and I can't seem to find through this monster where I could do that (and how). My best guess is somewhere in this part of the file, line 544 to 618 of the original ADO.NET EntityObject Generator T4 file : //////// //////// Write PrimitiveType Properties. //////// private void WritePrimitiveTypeProperty(EdmProperty primitiveProperty, CodeGenerationTools code) { MetadataTools ef = new MetadataTools(this); #> /// <summary> /// <#=SummaryComment(primitiveProperty)#> /// </summary><#=LongDescriptionCommentElement(primitiveProperty, 1)#> [EdmScalarPropertyAttribute(EntityKeyProperty=<#=code.CreateLiteral(ef.IsKey(primitiveProperty))#>, IsNullable=<#=code.CreateLiteral(ef.IsNullable(primitiveProperty))#>)] [DataMemberAttribute()] <#=code.SpaceAfter(NewModifier(primitiveProperty))#><#=Accessibility.ForProperty(primitiveProperty)#> <#=code.Escape(primitiveProperty.TypeUsage)#> <#=code.Escape(primitiveProperty)#> { <#=code.SpaceAfter(Accessibility.ForGetter(primitiveProperty))#>get { <#+ if (ef.ClrType(primitiveProperty.TypeUsage) == typeof(byte[])) { #> return StructuralObject.GetValidValue(<#=code.FieldName(primitiveProperty)#>); <#+ } else { #> return <#=code.FieldName(primitiveProperty)#>; <#+ } #> } <#=code.SpaceAfter(Accessibility.ForSetter((primitiveProperty)))#>set { <#+ if (ef.IsKey(primitiveProperty)) { if (ef.ClrType(primitiveProperty.TypeUsage) == typeof(byte[])) { #> if (!StructuralObject.BinaryEquals(<#=code.FieldName(primitiveProperty)#>, value)) <#+ } else { #> if (<#=code.FieldName(primitiveProperty)#> != value) <#+ } #> { <#+ PushIndent(CodeRegion.GetIndent(1)); } #> <#=ChangingMethodName(primitiveProperty)#>(value); ReportPropertyChanging("<#=primitiveProperty.Name#>"); <#=code.FieldName(primitiveProperty)#> = StructuralObject.SetValidValue(value<#=OptionalNullableParameterForSetValidValue(primitiveProperty, code)#>); ReportPropertyChanged("<#=primitiveProperty.Name#>"); <#=ChangedMethodName(primitiveProperty)#>(); <#+ if (ef.IsKey(primitiveProperty)) { PopIndent(); #> } <#+ } #> } } private <#=code.Escape(primitiveProperty.TypeUsage)#> <#=code.FieldName(primitiveProperty)#><#=code.StringBefore(" = ", code.CreateLiteral(primitiveProperty.DefaultValue))#>; partial void <#=ChangingMethodName(primitiveProperty)#>(<#=code.Escape(primitiveProperty.TypeUsage)#> value); partial void <#=ChangedMethodName(primitiveProperty)#>(); <#+ } Any help would be appreciated. Thanks in advance. EDIT : Didn't find answer to this problem yet, if anyone have ideas to automate this, would really be appreciated.

    Read the article

  • How to use value from primary accessdatasource control as parameter in select query for secondary ac

    - by weedave
    Hi, I'm trying to display all orders placed and I have a primary accessdatasource control that has a select query to get the customer information and the orderID. I want to use the orderID value from this first query as a parameter for the secondary accessdatasource control that selects the product information of the products in the order. In plain english, I want to:- select product info from product table where orderID = ? (where ? is the orderID value from the first query) I have tried the <%#Eval("OrderID")% but I get a "server tag not well formed" error, but I do get results returned when I just type the order ID in, but obviously every result (order) just contains the same product info... <asp:Repeater ID="Repeater1" runat="server" DataSourceID="AccessDataSource1"> <ItemTemplate> <asp:AccessDataSource ID="AccessDataSource2" runat="server" DataFile="~/App_Data/project.mdb" SelectCommand="SELECT orderDetails.OrderID, album.Artist, album.Album, album.Cost, album.ImageURL, orderDetails.Quantity, orderDetails.Total FROM (album INNER JOIN orderDetails ON album.AlbumID = orderDetails.AlbumID) WHERE (orderDetails.OrderID = ? )"> <SelectParameters> // Error is on this line <asp:Parameter Name="OrderID" DefaultValue="<%#Eval ("OrderID")%>" /> </SelectParameters> </asp:AccessDataSource> <div class="viewAllOrdersOrderArea"> <div class="viewAllOrdersOrderSummary"> <p><b>Order ID: </b><%#Eval("OrderID")%></p> <h4>Shipping Details</h4> <p><b>Shipping Address: </b><%#Eval("ShippingName")%>, <%#Eval("ShippingAddress")%>, <%#Eval("ShippingTown")%>, <%#Eval("ShippingPostcode")%></p> <h4>Payment Details</h4> <p><b>Cardholder's Address: </b><%#Eval("CardHolder")%>, <%#Eval("BillingAddress")%>, <%#Eval("BillingTown")%>, <%#Eval("BillingPostcode")%></p> <p><b>Payment Method: </b><%#Eval("CardType")%></p> <p><b>Card Number: </b><%#Eval("CardNumber")%></p> <p><b>Start Date: </b><%#Eval("StartDate")%>, Expiry Date: <%#Eval("ExpiryDate")%></p> <p><b>Security Digits: </b><%#Eval("SecurityDigits")%></p> <h4>Ordered items:</h4> <asp:Repeater ID="Repeater2" runat="server" DataSourceID="AccessDataSource2"> <ItemTemplate> <div style="display: block; float: left;"> <div class="viewAllOrdersProductImage"> <img width="70px" height="70px" alt="<%# Eval("Artist") %> - <%# Eval("Album") %>" src="assets/images/thumbs/<%# Eval("ImageURL") %>" /> </div> <div style="display:block; float:left; padding-top:15px; padding-right:20px;"><p><b><%# Eval("Artist") %> - <%# Eval("Album") %></b></p> <p>£<%# Eval("Cost") %> x <%# Eval("Quantity") %> = £<%#Eval("Total")%></p></div> </div> </ItemTemplate> </asp:Repeater> </div> </div> </ItemTemplate> </asp:Repeater>

    Read the article

  • CodePlex Daily Summary for Friday, August 17, 2012

    CodePlex Daily Summary for Friday, August 17, 2012Popular ReleasesXDA ROM HUB: Release v0.9.1: Fixed issue: "Can't recognize device, please try again" IMPORTENT! You MUST install this software in a path WITHOUT spaces, Good example: "C:\Users\Max\Documents" Please note that I lost the source code, so I can't update this softwareDotNetNuke® Feedback: 06.02.01: Official Release - 17th August 2012 Please look at the Release Notes file included in the module packages or available on this page as a separate download for a listing of the bug fixes and enhancements found in this version. NOTE: Feedback v 06.02.00 REQUIRES a minimum DotNetNuke framework version of 06.02.00 as well as ASP.Net 3.5 SP1 and MS SQL Server 2005 or 2008 (Express or standard versions). This release brings some enhancements to the module as well as fixing all known bugs. Bug Fi...fastJSON: v2.0.2: - bug fix $types and arraysDatabase View-plug-ins Programming Helper: Database View-plug-ins 1.2 (for Oracle): The download package consists of deployment SQL scripts. Run every scripts of all subdirectories in order (sort by name). "VPI" is the default schema name in the manifest, it can be changed to other name according to your enterprise database policy. Current release is for Oracle version (SQL Server version will be released later).Everybody Edits Account Manager: EEAccMan 1.1: Fixed: Incompatibility with the newest chrome version (v21)WPF Application Framework (WAF): WPF Application Framework (WAF) 2.5.0.7: Version: 2.5.0.7 (Milestone 7): This release contains the source code of the WPF Application Framework (WAF) and the sample applications. Requirements .NET Framework 4.0 (The package contains a solution file for Visual Studio 2010) The unit test projects require Visual Studio 2010 Professional Changelog Legend: [B] Breaking change; [O] Marked member as obsolete WAF: Add CollectionHelper.GetNextElementOrDefault method. InfoMan: Support creating a new email and saving it in the Send b...Diablo III Drop Statistics Service: D3DSS 1.0.1: ??????IP??。 ??????????,??????????。myCollections: Version 2.2.3.0: New in this version : Added setup package. Added Amazon Spain for Apps, Books, Games, Movie, Music, Nds and Tvshow. Added TVDB Spain for Tvshow. Added TMDB Spain for Movies. Added Auto rename files from title. Added more filters when adding files (vob,mpls,ifo...) Improve Books author and Music Artist Credits. Rewrite find duplicates for better performance. You can now add Custom link to items. You can now add type directly from the type list using right mouse button. Bug ...mydnn: DNN Garden - DDR Menu for DotNetNuke: ?? ??? ??? ???? ?? ???? ??????? ?? DDR Menu ?? ?? ????? ??? DNN ?? ??????. ??? ??? ?? ???? ??? ?????? ???? ??????? ???? ?? ????. ?? ????? ?? ????? ??????? ?????? SolPart ?? DNN Nav ??? ???? ????? ????? ?? ??????? ???? ?? ???? ??? CSS ????? ????. ?? ??? ??? ?????? ???? ??? ?? ??? ????? ??? ?? ?????? ?? jQuery ? CSS ????? ???? ????. ??? ???? ?? ???? Treeview ? Superfish? Accordion ? Dropdown ?Artisteer ? Mega-menu ?? ????.Player Framework by Microsoft: Player Framework for Windows 8 Preview 5 (Refresh): Support for Windows 8 and Visual Studio RTM Support for Smooth Streaming SDK beta 2 Support for live playback New bitrate meter and SD/HD indicators Auto smooth streaming track restriction for snapped mode to conserve bandwidth New "Go Live" button and SeekToLive API Support for offset start times Support for Live position unique from end time Support for multiple audio streams (smooth and progressive content) Improved intellisense in JS version NEW TO PREVIEW 5 REFRESH:Req...TFS Workbench: TFS Workbench v2.2.0.10: Compiled installers for TFS Workbench 2.2.0.10 Bug Fix Fixed bug that stopped the change workspace action from working.Microsoft Ajax Minifier: Microsoft Ajax Minifier 4.60: Allow for CSS3 grid-column and grid-row repeat syntax. Provide option for -analyze scope-report output to be in XML for easier programmatic processing; also allow for report to be saved to a separate output file.ClosedXML - The easy way to OpenXML: ClosedXML 0.67.2: v0.67.2 Fix when copying conditional formats with relative formulas v0.67.1 Misc fixes to the conditional formats v0.67.0 Conditional formats now accept formulas. Major performance improvement when opening files with merged ranges. Misc fixes.Umbraco CMS: Umbraco 4.8.1: Whats newBug fixes: Fixed: When upgrading to 4.8.0, the database upgrade didn't run Update: unfortunately, upgrading with SQLCE is problematic, there's a workaround here: http://bit.ly/TEmMJN The changes to the <imaging> section in umbracoSettings.config caused errors when you didn't apply them during the upgrade. Defaults will now be used if any keys are missing Scheduled unpublishes now only unpublishes nodes set to published rather than newest Work item: 30937 - Fixed problem with Fi...patterns & practices - Unity: Unity 3.0 for .NET 4.5 and WinRT - Preview: The Unity 3.0.1208.0 Preview enables Unity to work on .NET 4.5 with both the WinRT and desktop profiles. This is an updated version of the port after the .NET Framework 4.5 and Windows 8 have RTM'ed. Please see the Release Notes Providing feedback Post your feedback on the Unity forum Submit and vote on new features for Unity on our Uservoice site.Self-Tracking Entity Generator for WPF and Silverlight: Self-Tracking Entity Generator v 2.0.0 for VS11: Self-Tracking Entity Generator for WPF and Silverlight v 2.0.0 for Entity Framework 5.0 and Visual Studio 2012NPOI: NPOI 2.0: New features a. Implement OpenXml4Net (same as System.Packaging from Microsoft). It supports both .NET 2.0 and .NET 4.0 b. Excel 2007 read/write library (NPOI.XSSF) c. Word 2007 read/write library(NPOI.XWPF) d. NPOI.SS namespace becomes the interface shared between XSSF and HSSF e. Load xlsx template and save as new xlsx file (partially supported) f. Diagonal line in cell both in xls and xlsx g. Support isRightToLeft and setRightToLeft on the common spreadsheet Sheet interface, as per existin...BugNET Issue Tracker: BugNET 1.1: This release includes bug fixes from the 1.0 release for email notifications, RSS feeds, and several other issues. Please see the change log for a full list of changes. http://support.bugnetproject.com/Projects/ReleaseNotes.aspx?pid=1&m=76 Upgrade Notes The following changes to the web.config in the profile section have occurred: Removed <add name="NotificationTypes" type="String" defaultValue="Email" customProviderData="NotificationTypes;nvarchar;255" />Added <add name="ReceiveEmailNotifi...????: ????2.0.5: 1、?????????????。RiP-Ripper & PG-Ripper: PG-Ripper 1.4.01: changes NEW: Added Support for Clipboard Function in Mono Version NEW: Added Support for "ImgBox.com" links FIXED: "PixHub.eu" links FIXED: "ImgChili.com" links FIXED: Kitty-Kats Forum loginNew ProjectsAdvanced Task Manager: The Advanced Task Manager is a beautified and easy-to-use Task Manager for Windows, with even a few added features!CashBook: CashBook public beta release. Collect basic information on cashflow in and out of your organisation for your bookkeeper.Digital Image: Projeto academico de código aberto com o propósito de auxiliar na aprendizagem da Computação Gráfica. Desenvolvimento utilizando: C#, ASP .NET MVC e NHibernateFgPop: FgPop is a JQuery script generator starting from FgPop class properties you set. HDI Charts: A Charting Library for ASP.NET with Gantt, Line and Bar Charts. Possibility to draw Calculated Graphs, eg: x² or Interview Test: Interview Testing ProjectMeotom.Net: Meotom.Net is free upload image ...MetroCloud: Sync your cloudMissing Poster: Missing Poster is a tool to assist SAR and police to create and distribute missing person posters in a standardized format. OMAOL Sealer: Der OMAOL Stealer ist ein open source Stealer in C#. Zur Ausführung wird das .Net Framework 2.0 benötigt.Planar Mechanism Kinematic Simulator (PMKS): PMKS returns quick and accurate results for the position, velocity, and acceleration of rigid bodies connected as planar mechanisms.Real Life Library: Using this library, you will be able to make your own simulation of the real life! Just for fun.Smart String Resources: Creates a class to access resx strings with named parameters and provides access to the resource keys to use with attribute-based validations.testdd08162012hg: dfvtestdd08162012tfs01: dsftestddgit08152012: ,.,.testddgit0816201201: vbtesthg08192012hg01: dsTQ Sharepoint 2010 Twitter Feeds webpart: TQ Sharepoint 2010 Twitter Feeds webpart No credential required this webpart searches public tweets based on keyword/topic/trend.Vortex: Vortex is a simple asynchronous network library written in C#, for ease of use and rapid application development.WakeUp SharePoint 2010/2013 with powershell: It also works with ADFS and claims.Windows Azure + SQL Azure Monitoring: Simple Azuer app demonstrating how to add basic monitoring for troubleshooting.WPFP - XPS Document Layouting and Generation: XPS Document Layouting and GenerationXBDesign: a test project onlyYacht Transport Lines: Yacht Transport Lines

    Read the article

  • CodePlex Daily Summary for Thursday, August 16, 2012

    CodePlex Daily Summary for Thursday, August 16, 2012Popular ReleasesCoding4Fun Tools: Coding4Fun.Phone.Toolkit v1.6.1: Bug Fix release Bug Fixes Better support for transparent images IsFrozen respected if not bound to corrected deadlock stateTask Card Creator 2012: TaskCardCreator2012 4.0.2.0: What's New in version 4.0.2.0:First stable version Build with Visual Studio 2012 RTM UX/UI improvedWPF Application Framework (WAF): WPF Application Framework (WAF) 2.5.0.7: Version: 2.5.0.7 (Milestone 7): This release contains the source code of the WPF Application Framework (WAF) and the sample applications. Requirements .NET Framework 4.0 (The package contains a solution file for Visual Studio 2010) The unit test projects require Visual Studio 2010 Professional Changelog Legend: [B] Breaking change; [O] Marked member as obsolete WAF: Add CollectionHelper.GetNextElementOrDefault method. InfoMan: Support creating a new email and saving it in the Send b...Easy ADB: Easy ABD V0.2.1.1: Added ICS support Fixed some bugsDiablo III Drop Statistics Service: D3DSS 1.0.1: ??????IP??。 ??????????,??????????。myCollections: Version 2.2.3.0: New in this version : Added setup package. Added Amazon Spain for Apps, Books, Games, Movie, Music, Nds and Tvshow. Added TVDB Spain for Tvshow. Added TMDB Spain for Movies. Added Auto rename files from title. Added more filters when adding files (vob,mpls,ifo...) Improve Books author and Music Artist Credits. Rewrite find duplicates for better performance. You can now add Custom link to items. You can now add type directly from the type list using right mouse button. Bug ...mydnn: DNN Garden - DDR Menu for DotNetNuke: ?? ??? ??? ???? ?? ???? ??????? ?? DDR Menu ?? ?? ????? ??? DNN ?? ??????. ??? ??? ?? ???? ??? ?????? ???? ??????? ???? ?? ????. ?? ????? ?? ????? ??????? ?????? SolPart ?? DNN Nav ??? ???? ????? ????? ?? ??????? ???? ?? ???? ??? CSS ????? ????. ?? ??? ??? ?????? ???? ??? ?? ??? ????? ??? ?? ?????? ?? jQuery ? CSS ????? ???? ????. ??? ???? ?? ???? Treeview ? Superfish? Accordion ? Dropdown ?Artisteer ? Mega-menu ?? ????.Player Framework by Microsoft: Player Framework for Windows 8 Preview 5 (Refresh): Support for Windows 8 and Visual Studio RTM Support for Smooth Streaming SDK beta 2 Support for live playback New bitrate meter and SD/HD indicators Auto smooth streaming track restriction for snapped mode to conserve bandwidth New "Go Live" button and SeekToLive API Support for offset start times Support for Live position unique from end time Support for multiple audio streams (smooth and progressive content) Improved intellisense in JS version NEW TO PREVIEW 5 REFRESH:Req...Visual Rx: V 2.0.20622.10: help will be available at my blog http://blogs.microsoft.co.il/blogs/bnaya/archive/2012/08/12/visual-rx-toc.aspx the SDK is also available though NuGet (search for VisualRx) http://nuget.org/packages/VisualRx if you want to make sure that the Visual Rx Viewer can monitor on your machine, you can install the Visual Rx Tester and run it while the Viewer is running.TFS Workbench: TFS Workbench v2.2.0.10: Compiled installers for TFS Workbench 2.2.0.10 Bug Fix Fixed bug that stopped the change workspace action from working.Microsoft Ajax Minifier: Microsoft Ajax Minifier 4.60: Allow for CSS3 grid-column and grid-row repeat syntax. Provide option for -analyze scope-report output to be in XML for easier programmatic processing; also allow for report to be saved to a separate output file.ClosedXML - The easy way to OpenXML: ClosedXML 0.67.2: v0.67.2 Fix when copying conditional formats with relative formulas v0.67.1 Misc fixes to the conditional formats v0.67.0 Conditional formats now accept formulas. Major performance improvement when opening files with merged ranges. Misc fixes.Umbraco CMS: Umbraco 4.8.1: Whats newBug fixes: Fixed: When upgrading to 4.8.0, the database upgrade didn't run Update: unfortunately, upgrading with SQLCE is problematic, there's a workaround here: http://bit.ly/TEmMJN The changes to the <imaging> section in umbracoSettings.config caused errors when you didn't apply them during the upgrade. Defaults will now be used if any keys are missing Scheduled unpublishes now only unpublishes nodes set to published rather than newest Work item: 30937 - Fixed problem with Fi...patterns & practices - Unity: Unity 3.0 for .NET 4.5 and WinRT - Preview: The Unity 3.0.1208.0 Preview enables Unity to work on .NET 4.5 with both the WinRT and desktop profiles. This is an updated version of the port after the .NET Framework 4.5 and Windows 8 have RTM'ed. Please see the Release Notes Providing feedback Post your feedback on the Unity forum Submit and vote on new features for Unity on our Uservoice site.Self-Tracking Entity Generator for WPF and Silverlight: Self-Tracking Entity Generator v 2.0.0 for VS11: Self-Tracking Entity Generator for WPF and Silverlight v 2.0.0 for Entity Framework 5.0 and Visual Studio 2012AssaultCube Reloaded: 2.5.2 Unnamed: Linux has Ubuntu 11.10 32-bit precompiled binaries and Ubuntu 10.10 64-bit precompiled binaries, but you can compile your own as it also contains the source. The server pack is ready for both Windows and Linux, but you might need to compile your own for Linux (source included) Added 3rd person Added mario jumps Fixed nextprimary code exploit Fix sendmap (must send before voting) Zombies have waves Convert uses rounds instead of ending the match Better throwing knife hit detectio...NPOI: NPOI 2.0: New features a. Implement OpenXml4Net (same as System.Packaging from Microsoft). It supports both .NET 2.0 and .NET 4.0 b. Excel 2007 read/write library (NPOI.XSSF) c. Word 2007 read/write library(NPOI.XWPF) d. NPOI.SS namespace becomes the interface shared between XSSF and HSSF e. Load xlsx template and save as new xlsx file (partially supported) f. Diagonal line in cell both in xls and xlsx g. Support isRightToLeft and setRightToLeft on the common spreadsheet Sheet interface, as per existin...BugNET Issue Tracker: BugNET 1.1: This release includes bug fixes from the 1.0 release for email notifications, RSS feeds, and several other issues. Please see the change log for a full list of changes. http://support.bugnetproject.com/Projects/ReleaseNotes.aspx?pid=1&m=76 Upgrade Notes The following changes to the web.config in the profile section have occurred: Removed <add name="NotificationTypes" type="String" defaultValue="Email" customProviderData="NotificationTypes;nvarchar;255" />Added <add name="ReceiveEmailNotifi...????: ????2.0.5: 1、?????????????。RiP-Ripper & PG-Ripper: PG-Ripper 1.4.01: changes NEW: Added Support for Clipboard Function in Mono Version NEW: Added Support for "ImgBox.com" links FIXED: "PixHub.eu" links FIXED: "ImgChili.com" links FIXED: Kitty-Kats Forum loginNew ProjectsBase Code: SummaryCanvas Control Library & new Forms Based System for creating web pages & website: Canvas Control Library is a collection of HTML5 canvas based controls and a new forms based system of doing AJAX postbacks with which to build forms in web pageCJK Decomposition Data: The CJK Decomposition Data File is a graphical analysis of the approx 75,000 Chinese/Japanese characters in Unicode.Corporate News App for SharePoint 2013: This project is an open and free App for SharePoint 2013. This tool helps site owners to add simple corporate news client app parts in SharePoint sites.DictationTool: A tool to do dictation and compare with original text. WPF & Silverlight versionEagleFramework: EagleFramework?????????,??????、????、???、Excel??、???????HDI Aggregated View: A SharePoint Webpart which provides an aggregated View of a List. Sums up all selected fields or calculates an average. Great variety to Filter the View.HDI JS Libs: A SharePoinnt Feature which includes jQuery and SPServices to a Site or Web. HDI SP Tag Importer: A Windows application for Importing CSV Data to a SharePoint List or Document Library.HDI Table: Simple SharePoint Table WebPart with possibilities to nest data infinite and summarize even Calculated Fields.iEverything: As Detailed on eladplus.codeplex.com,the replacer of eladplus is ieverything. View our "TV Ad" on:outlookphone.com/tva/ieverything.wmvIISLogAnalysis: this is a simple tool for analys your iis log files:most ip,most browser,most url and so onJefferys blog code samples: My sample code for my blog articles for blog visitors to look at.livewell: web technology studyMaxBlox: Build a SAAS application using MaxBlox as the building platform. Create your own custom tables and reports with interface to DB, security built-in to MaxBlox. MoltenMercury: Molten Mercury is a anime style character creator inspired by ???????????. Using it you can create your own anime character!MvcClient: MvcClient reverse engineers HTML forms produced by ASP.NET MVC to create a strongly-typed model decorated with presentation and validation attributes.My source code for Introduction to Algorithms: My source code for Introduction to Algorithmspaycell-code: This is text sms blast projectRootSync: This project is an open-source file syncronization website which will be linked to an iPhone and Android app as well as a Windows Desktop sync application.SB Form Editor: Small Basic Form Editor is a forms editor for Microsoft's Small Basic language. It allows you to add button, textboxes, change the form settings, and more!SharePoint Column & View Permission: SharePoint Column & View Permission. Set Permission for Columns and Views in SharePoint 2010.TerraCool - Simple Localization library and tools: Simple Localization library and toolsURL SHORTNER: In the Beta release we are planing to include the following:WILP: C# ASP.NET PROJECTXXXDEMO: Ðây là d? án ma. M?i thông tin vui lòng liên h? Bình Tiên Sinh

    Read the article

  • CodePlex Daily Summary for Saturday, August 18, 2012

    CodePlex Daily Summary for Saturday, August 18, 2012Popular ReleasesExtAspNet: ExtAspNet v3.1.9: +2012-08-18 v3.1.9 -??other/addtab.aspx???JS???BoundField??Tooltip???(Dennis_Liu)。 +??Window?GetShowReference???????????????(︶????、????、???、??~)。 -?????JavaScript?????,??????HTML????????。 -??HtmlNodeBuilder????????????????JavaScript??。 -??????WindowField、LinkButton、HyperLink????????????????????????????。 -???????????grid/griddynamiccolumns2.aspx(?????)。 -?????Type??Reset?????,??????????????????(e??)。 -?????????????????????。 -?????????int,short,double??????????(???)。 +?Window????Ge...XDA ROM HUB: Release v0.9.3: ChangelogAdded a new UI Removed unnecessary features Fixed a lot of bugs Adding new firmwares (Please help me) Added a new app for Android Ability to backup apps to the SD Card Ability to create Nandroid backups without a PC Ability to backup apps and restore from CWM Improved download manager Now supporting pause and resume Converting Bytes to MegaBytes Improved dialogs Removed support for 7z files Changed installer Known BugsDialog message will always appear when clic...Task Card Creator 2010: TaskCardCreator2010 4.0.2.0: What's New: UI/UX improved using a contextual ribbon tab for reports Finishing the "new 4.0 UI" Report template help improved New project branch to support TFS 2012: http://taskcardcreator2012.codeplex.com User interface made more modern (4.0.1.0) Smarter algorithm used for report generation (4.0.1.0) Quality setting added (4.0.1.0) Terms harmonized (4.0.1.0) Miscellaneous optimizations (4.0.1.0) Fixed critical issue introduced in 4.0.0.0 (4.0.1.0)AcDown????? - AcDown Downloader Framework: AcDown????? v4.0.1: ?? ●AcDown??????????、??、??????。????,????,?????????????????????????。???????????Acfun、????(Bilibili)、??、??、YouTube、??、???、??????、SF????、????????????。 ●??????AcPlay?????,??????、????????????????。 ● AcDown??????????????????,????????????????????????????。 ● AcDown???????C#??,????.NET Framework 2.0??。?????"Acfun?????"。 ????32??64? Windows XP/Vista/7/8 ??:????????Windows XP???,?????????.NET Framework 2.0???(x86),?????"?????????"??? ??????????????,??????????: ??"AcDown?????"????????? ...Fluent Validation for .NET: 3.4: Changes since 3.3: Make ValidationResut.IsValid virtual Add private no-arg ctor to ValidationFailure to help with serialization Add Turkish error messages Work-around for reflection bug in .NET 4.5 that caused VerificationExceptions Assemblies are now unsigned to ease with versioning/upgrades (especially where other frameworks depend on FV) (Note if you need signed assemblies then you can use the following NuGet packages: FluentValidation-signed, FluentValidation.MVC3-signed, FluentV...fastJSON: v2.0.2: - bug fix $types and arraysAssaultCube Reloaded: 2.5.3 Unnamed Fixed: If you are using deltas, download 2.5.2 first, then overwrite with the delta packages. Linux has Ubuntu 11.10 32-bit precompiled binaries and Ubuntu 10.10 64-bit precompiled binaries, but you can compile your own as it also contains the source. If you are using Mac or other operating systems, please wait while we try to package for those OSes. Try to compile it. If it fails, download a virtual machine. The server pack is ready for both Windows and Linux, but you might need to compile your ...Coding4Fun Tools: Coding4Fun.Phone.Toolkit v1.6.1: Bug Fix release Bug Fixes Better support for transparent images IsFrozen respected if not bound to corrected deadlock stateWPF Application Framework (WAF): WPF Application Framework (WAF) 2.5.0.7: Version: 2.5.0.7 (Milestone 7): This release contains the source code of the WPF Application Framework (WAF) and the sample applications. Requirements .NET Framework 4.0 (The package contains a solution file for Visual Studio 2010) The unit test projects require Visual Studio 2010 Professional Changelog Legend: [B] Breaking change; [O] Marked member as obsolete WAF: Add CollectionHelper.GetNextElementOrDefault method. InfoMan: Support creating a new email and saving it in the Send b...Diablo III Drop Statistics Service: D3DSS 1.0.1: ??????IP??。 ??????????,??????????。myCollections: Version 2.2.3.0: New in this version : Added setup package. Added Amazon Spain for Apps, Books, Games, Movie, Music, Nds and Tvshow. Added TVDB Spain for Tvshow. Added TMDB Spain for Movies. Added Auto rename files from title. Added more filters when adding files (vob,mpls,ifo...) Improve Books author and Music Artist Credits. Rewrite find duplicates for better performance. You can now add Custom link to items. You can now add type directly from the type list using right mouse button. Bug ...Player Framework by Microsoft: Player Framework for Windows 8 Preview 5 (Refresh): Support for Windows 8 and Visual Studio RTM Support for Smooth Streaming SDK beta 2 Support for live playback New bitrate meter and SD/HD indicators Auto smooth streaming track restriction for snapped mode to conserve bandwidth New "Go Live" button and SeekToLive API Support for offset start times Support for Live position unique from end time Support for multiple audio streams (smooth and progressive content) Improved intellisense in JS version NEW TO PREVIEW 5 REFRESH:Req...TFS Workbench: TFS Workbench v2.2.0.10: Compiled installers for TFS Workbench 2.2.0.10 Bug Fix Fixed bug that stopped the change workspace action from working.Microsoft Ajax Minifier: Microsoft Ajax Minifier 4.60: Allow for CSS3 grid-column and grid-row repeat syntax. Provide option for -analyze scope-report output to be in XML for easier programmatic processing; also allow for report to be saved to a separate output file.ClosedXML - The easy way to OpenXML: ClosedXML 0.67.2: v0.67.2 Fix when copying conditional formats with relative formulas v0.67.1 Misc fixes to the conditional formats v0.67.0 Conditional formats now accept formulas. Major performance improvement when opening files with merged ranges. Misc fixes.Umbraco CMS: Umbraco 4.8.1: Whats newBug fixes: Fixed: When upgrading to 4.8.0, the database upgrade didn't run Update: unfortunately, upgrading with SQLCE is problematic, there's a workaround here: http://bit.ly/TEmMJN The changes to the <imaging> section in umbracoSettings.config caused errors when you didn't apply them during the upgrade. Defaults will now be used if any keys are missing Scheduled unpublishes now only unpublishes nodes set to published rather than newest Work item: 30937 - Fixed problem with Fi...patterns & practices - Unity: Unity 3.0 for .NET 4.5 and WinRT - Preview: The Unity 3.0.1208.0 Preview enables Unity to work on .NET 4.5 with both the WinRT and desktop profiles. This is an updated version of the port after the .NET Framework 4.5 and Windows 8 have RTM'ed. Please see the Release Notes Providing feedback Post your feedback on the Unity forum Submit and vote on new features for Unity on our Uservoice site.Self-Tracking Entity Generator for WPF and Silverlight: Self-Tracking Entity Generator v 2.0.0 for VS11: Self-Tracking Entity Generator for WPF and Silverlight v 2.0.0 for Entity Framework 5.0 and Visual Studio 2012NPOI: NPOI 2.0: New features a. Implement OpenXml4Net (same as System.Packaging from Microsoft). It supports both .NET 2.0 and .NET 4.0 b. Excel 2007 read/write library (NPOI.XSSF) c. Word 2007 read/write library(NPOI.XWPF) d. NPOI.SS namespace becomes the interface shared between XSSF and HSSF e. Load xlsx template and save as new xlsx file (partially supported) f. Diagonal line in cell both in xls and xlsx g. Support isRightToLeft and setRightToLeft on the common spreadsheet Sheet interface, as per existin...BugNET Issue Tracker: BugNET 1.1: This release includes bug fixes from the 1.0 release for email notifications, RSS feeds, and several other issues. Please see the change log for a full list of changes. http://support.bugnetproject.com/Projects/ReleaseNotes.aspx?pid=1&m=76 Upgrade Notes The following changes to the web.config in the profile section have occurred: Removed <add name="NotificationTypes" type="String" defaultValue="Email" customProviderData="NotificationTypes;nvarchar;255" />Added <add name="ReceiveEmailNotifi...New Projectscocos2d simpledemo: simple demo cocos2dDiscuzViet: Discuz Vi?t Nam - discuz.vnEaseSettings: EaseSettings is a library designed to allow easy usage of settings with a highly structured in treenode-form.Face Detection & Recognition: Face Detection & Recognition project. It provide an interface for face detection and recognition FIM 2010 GoogleApps MA: Forefront Identity Manager 2010 Management Agent for Google Apps. You can synchronize users between Google Apps and Forefront Identity Manager 2010.Get System Info: Get System Information is an open source project licensed under the GNU Public License v2. This project allows you to view information about your system.go launcher: Go launchergrOOvy language (the spec): A formal specification of what the Groovy Language does.JavaScript Prototype Extension: It is a standalone JavaScript extension based on JavaScript prototype directly, to make developers use JS like C# or Java.Jump N Roll Windows Phone 7: Jump n Roll is a remake of the classic amiga game for windows phone 7, using vb.net and XNA. Version 1 is in a working but unfinished state.KingOfHorses: This is a Capstone Project from FPT University.Lan House Manager: Trabalho de conclusão de curso da faculdade de Ciências da Computação 2009 UNISANTA. -.NET -C# -WPF -ASP.NET MVC -Entity Framework -SQL ServerMy source code: This project contains my source code.MySimpleProjectForKudu: Cool stuffNWP INTRANET: NWP Intranet, a complete and useful intranet application for a wide cainds of companies.P.O.W. - PowerShell on the Web - DevOps Automation Portal: The PowerShell DevOps Portal provides a SharePoint like experience but centralized around the execution of PowerShell scripts to automate DevOps oriented tasks.Piwik for Microsoft Silverlight Analytics Framework: Piwik for Micorsoft Silverlight Analytics adds Piwik support to the MSAFPlaygroundSite: pluralsight tutSkewboid Approach to Pareto Relaxation and Filtering: For multi-objective decision-making and optimization - an adjustment parameter, alpha, is added to the conventional determination of Pareto optimality.Software Factories: Software Factory Generatorsspaceship cocos2dx demo: testing onlySpring_DWR: Present day I had a requirement where using Spring and Direct web remoting. testgit08172012git01: yuitesttom08172012tfs01: ytryytrtouchdragdemo: touch drag demoVirtual Pilot Client: An open-source pilot client for the VATSIM network. See discussions at http://forums.vatsim.net/viewforum.php?f=124 Visual Studio IDE Service - DTE: Visual Studio ServicesWCF AOP Sample: This project contains a simple implementation of AOP for WCF. It illustrates how to do simple logging and param masking using basic WCF extensions and Unity.WeatherApp: Aplicación para ver el clima????: ??????????,????

    Read the article

  • getting database connectivity issue from only one part of my ASP.net project?

    - by Greg
    Hi, Something weird has started happening to my project with Dynamic Data. Suddenly I am now getting connection errors when going to the DD navigation pages, but things work fine on the default DD main page, and also other MVC pages I've added in myself work fine to the database. Any ideas? So in summary if I go to the following web pages: custom URL for my custom controller - this works fine, including getting database data main DD page from root URL - this works fine click on a link to a table maintenance page from the main DD page - GET DATABASE CONNECTIVITY ERROR Some items: * I'm using SQL Server Express 2008 * Doesn't seem to be any debug/error info in VS2010 at all I can see * Web config entry: <add name="Model1Container" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=GREG\SQLEXPRESS_2008;Initial Catalog=greg_development;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/> Error: Server Error in '/' Application. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) Source Error: Line 39: DropDownList1.Items.Add(new ListItem("[Not Set]", NullValueString)); Line 40: } Line 41: PopulateListControl(DropDownList1); Line 42: // Set the initial value if there is one Line 43: string initialValue = DefaultValue; Source File: U:\My Dropbox\source\ToplogyLibrary\Topology_Web_Dynamic\DynamicData\Filters\ForeignKey.ascx.cs Line: 41 Stack Trace: [SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009598 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234 System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity) +341 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject) +129 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) +239 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +195 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +232 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +33 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +524 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +479 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126 System.Data.SqlClient.SqlConnection.Open() +125 System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +52 [EntityException: The underlying provider failed on Open.] System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +161 System.Data.EntityClient.EntityConnection.Open() +98 System.Data.Objects.ObjectContext.EnsureConnection() +81 System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +46 System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() +44 System.Data.Objects.ObjectQuery`1.GetEnumeratorInternal() +36 System.Data.Objects.ObjectQuery.System.Collections.IEnumerable.GetEnumerator() +10 System.Web.DynamicData.Misc.FillListItemCollection(IMetaTable table, ListItemCollection listItemCollection) +50 System.Web.DynamicData.QueryableFilterUserControl.PopulateListControl(ListControl listControl) +85 Topology_Web_Dynamic.ForeignKeyFilter.Page_Init(Object sender, EventArgs e) in U:\My Dropbox\source\ToplogyLibrary\Topology_Web_Dynamic\DynamicData\Filters\ForeignKey.ascx.cs:41 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnInit(EventArgs e) +91 System.Web.UI.UserControl.OnInit(EventArgs e) +83 System.Web.UI.Control.InitRecursive(Control namingContainer) +140 System.Web.UI.Control.AddedControl(Control control, Int32 index) +197 System.Web.UI.ControlCollection.Add(Control child) +79 System.Web.DynamicData.DynamicFilter.EnsureInit(IQueryableDataSource dataSource) +200 System.Web.DynamicData.QueryableFilterRepeater.<Page_InitComplete>b__1(DynamicFilter f) +11 System.Collections.Generic.List`1.ForEach(Action`1 action) +145 System.Web.DynamicData.QueryableFilterRepeater.Page_InitComplete(Object sender, EventArgs e) +607 System.EventHandler.Invoke(Object sender, EventArgs e) +0 System.Web.UI.Page.OnInitComplete(EventArgs e) +8871862 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +604 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

    Read the article

  • Two-way databinding of a custom templated asp.net control

    - by Jason
    I hate long code snippets and I'm sorry about this one, but it turns out that this asp.net stuff can't get much shorter and it's so specific that I haven't been able to generalize it without a full code listing. I just want simple two-way, declarative, edit-only databinding to a single instance of an object. Not a list of objects of a type with a bunch of NotImplementedExceptions for Add, Delete, and Select, but just a single view-state persisted object. This is certainly something that can be done but I've struggled with an implementation for years. This newest, closest implementation was inspired by this article from 4-Guys-From-Rolla. Unfortunately, after implementing, I'm getting the following error and I don't know what I'm missing: System.InvalidOperationException: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control. If I don't use Bind(), and only use Eval() functionality, it works. In that way, the error is especially confusing. Update: Actually, using Eval() does NOT work, but using <%# Container.SampleString %> works. However, Eval("SampleString") gives the same error. That leads me back to this article I found earlier but had discarded. Now I believe it might be related, though I haven't cracked it yet ... Here's the simplified codeset that still produces the error: using System.ComponentModel; namespace System.Web.UI.WebControls.Special { public class SampleFormData { public string SampleString = "Sample String Data"; public int SampleInt = -1; } [ToolboxItem(false)] public class SampleSpecificFormDataContainer : DataBoundControl, INamingContainer { SampleSpecificEntryForm entryForm; internal SampleSpecificEntryForm EntryForm { get { return entryForm; } } [Bindable(true), Category("Data")] public string SampleString { get { return entryForm.FormData.SampleString; } set { entryForm.FormData.SampleString = value; } } [Bindable(true), Category("Data")] public int SampleInt { get { return entryForm.FormData.SampleInt; } set { entryForm.FormData.SampleInt = value; } } internal SampleSpecificFormDataContainer(SampleSpecificEntryForm entryForm) { this.entryForm = entryForm; } } public class SampleSpecificEntryForm : WebControl, INamingContainer { #region Template private IBindableTemplate formTemplate = null; [Browsable(false), DefaultValue(null), TemplateContainer(typeof(SampleSpecificFormDataContainer), ComponentModel.BindingDirection.TwoWay), PersistenceMode(PersistenceMode.InnerProperty)] public virtual IBindableTemplate FormTemplate { get { return formTemplate; } set { formTemplate = value; } } #endregion #region Viewstate SampleFormData FormDataVS { get { return (ViewState["FormData"] as SampleFormData) ?? new SampleFormData(); } set { ViewState["FormData"] = value; SaveViewState(); } } #endregion public override ControlCollection Controls { get { EnsureChildControls(); return base.Controls; } } private SampleSpecificFormDataContainer formDataContainer = null; [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public SampleSpecificFormDataContainer FormDataContainer { get { EnsureChildControls(); return formDataContainer; } } [Bindable(true), Browsable(false)] public SampleFormData FormData { get { return FormDataVS; } set { FormDataVS = value; } } protected override void CreateChildControls() { if (!this.ChildControlsCreated) { Controls.Clear(); formDataContainer = new SampleSpecificFormDataContainer(this); Controls.Add(formDataContainer); FormTemplate.InstantiateIn(formDataContainer); this.ChildControlsCreated = true; } } public override void DataBind() { CreateChildControls(); base.DataBind(); } } } With an ASP.NET page the following: <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="Default2.aspx.cs" Inherits="EntryFormTest._Default2" EnableEventValidation="false" %> <%@ Register Assembly="EntryForm" Namespace="System.Web.UI.WebControls.Special" TagPrefix="cc1" %> <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> </asp:Content> <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <h2> Welcome to ASP.NET! </h2> <cc1:SampleSpecificEntryForm ID="EntryForm1" runat="server"> <FormTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("SampleString") %>'></asp:TextBox><br /> <h3>(<%# Container.SampleString %>)</h3><br /> <asp:Button ID="Button1" runat="server" Text="Button" /> </FormTemplate> </cc1:SampleSpecificEntryForm> </asp:Content> Default2.aspx.cs using System; namespace EntryFormTest { public partial class _Default2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { EntryForm1.DataBind(); } } } Thanks for any help!

    Read the article

  • Problems with Optimistic Concurrency through an ObjectDataSource and a GridView

    - by Bloodsplatter
    Hi I'm having a problem in an ASP .NET 2.0 Application. I have a GridView displaying data from an ObjectDataSource (connected to a BLL class which connects to a TabledAdapter (Typed Dataset using optimistic concurrency). The select (displaying the data) works just fine, however, when I update a row the GridView does pass the old values to the ObjectDataSource. <DataObjectMethod(DataObjectMethodType.Update, True)> _ Public Function UpdateOC(ByVal original_id As Integer, ByVal original_fotonummer As Integer, ByVal original_inhoud As String, ByVal original_postdatum As Date?, ByVal fotonummer As Integer, ByVal inhoud As String, ByVal postdatum As Date?) As Boolean Dim tweets As TwitpicOC.TweetsDataTable = adapterOC.GetTweetById(original_id) If tweets.Rows.Count = 0 Then Return False Dim row As TwitpicOC.TweetsRow = tweets(0) SmijtHetErIn(row, original_fotonummer, original_inhoud, original_postdatum) row.AcceptChanges() SmijtHetErIn(row, fotonummer, inhoud, postdatum) Return adapterOC.Update(row) = 1 End Function Public Sub SmijtHetErIn(ByVal row As TwitpicOC.TweetsRow, ByVal original_fotonummer As Integer, ByVal original_inhoud As String, ByVal original_postdatum As Date?) With row .fotonummer = original_fotonummer If String.IsNullOrEmpty(original_inhoud) Then .SetinhoudNull() Else .inhoud = original_inhoud If Not original_postdatum.HasValue Then .SetpostdatumNull() Else .postdatum = original_postdatum.Value End With End Sub And this is the part of the page: <div id='Overzicht' class='post'> <div class='title'> <h2> <a href='javascript:;'>Tweetsoverzicht</a></h2> <p> Overzicht</p> </div> <div class='entry'> <p> <asp:ObjectDataSource ID="odsGebruiker" runat="server" OldValuesParameterFormatString="" SelectMethod="GetAll" TypeName="TakeHomeWeb.BLL.GebruikersBLL"></asp:ObjectDataSource> <asp:ObjectDataSource ID="odsFoto" runat="server" SelectMethod="GetFotosByGebruiker" TypeName="TakeHomeWeb.BLL.FotosBLL"> <SelectParameters> <asp:ControlParameter ControlID="ddlGebruiker" DefaultValue="0" Name="userid" PropertyName="SelectedValue" Type="Int32" /> </SelectParameters> </asp:ObjectDataSource> <form id="form1" runat="server"> <asp:Label runat="server" AssociatedControlID="ddlGebruiker">Gebruiker:&nbsp;</asp:Label> <asp:DropDownList ID="ddlGebruiker" runat="server" AutoPostBack="True" DataSourceID="odsGebruiker" DataTextField="naam" DataValueField="userid" AppendDataBoundItems="True"> <asp:ListItem Text="Kies een gebruiker" Value="-1" /> </asp:DropDownList> <br /> <asp:Label runat="server" AssociatedControlID="ddlFoto">Foto:&nbsp;</asp:Label> <asp:DropDownList ID="ddlFoto" runat="server" AutoPostBack="True" DataSourceID="odsFoto" DataTextField="url" DataValueField="id" AppendDataBoundItems="True"> <asp:ListItem Value="-1">Kies een foto...</asp:ListItem> </asp:DropDownList> <br /> <div style="float: left"> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="odsTweets"> <Columns> <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" /> <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True" SortExpression="id" /> <asp:BoundField DataField="fotonummer" HeaderText="fotonummer" SortExpression="fotonummer" /> <asp:BoundField DataField="inhoud" HeaderText="inhoud" SortExpression="inhoud" /> <asp:BoundField DataField="postdatum" HeaderText="postdatum" SortExpression="postdatum" /> </Columns> </asp:GridView> <asp:ObjectDataSource ID="odsTweets" runat="server" ConflictDetection="CompareAllValues" DeleteMethod="DeleteOC" OldValuesParameterFormatString="original_{0}" SelectMethod="GetTweetsByFotoId" TypeName="TakeHomeWeb.BLL.TweetsOCBLL" UpdateMethod="UpdateOC"> <DeleteParameters> <asp:Parameter Name="original_id" Type="Int32" /> <asp:Parameter Name="original_fotonummer" Type="Int32" /> <asp:Parameter Name="original_inhoud" Type="String" /> <asp:Parameter Name="original_postdatum" Type="DateTime" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="original_id" Type="Int32" /> <asp:Parameter Name="original_fotonummer" Type="Int32" /> <asp:Parameter Name="original_inhoud" Type="String" /> <asp:Parameter Name="original_postdatum" Type="DateTime" /> <asp:Parameter Name="fotonummer" Type="Int32" /> <asp:Parameter Name="inhoud" Type="String" /> <asp:Parameter Name="postdatum" Type="DateTime" /> </UpdateParameters> <SelectParameters> <asp:ControlParameter ControlID="ddlFoto" Name="foto" PropertyName="SelectedValue" Type="Int32" /> </SelectParameters> </asp:ObjectDataSource> </div> </form> </p> </div> </div> I've got a feeling there's huge fail involved or something, but I've been staring at it for hours now and I just can't find it.

    Read the article

  • Repopulating a collection of Backbone forms with previously submitted data

    - by Brian Wheat
    I am able to post my forms to my database and I have stepped through my back end function to check and see that my Get function is returning the same data I submitted. However I am having trouble understanding how to have this data rendered upon visiting the page again. What am I missing? The intention is to be able to create, read, update, or delete (CRUD) some personal contact data for a variable collection of individuals. //Model var PersonItem = Backbone.Model.extend({ url: "/Application/PersonList", idAttribute: "PersonId", schema: { Title: { type: 'Select', options: function (callback) { $.getJSON("/Application/GetTitles/").done(callback); } }, Salutation: { type: 'Select', options: ['Mr.', 'Mrs.', 'Ms.', 'Dr.'] }, FirstName: 'Text', LastName: 'Text', MiddleName: 'Text', NameSuffix: 'Text', StreetAddress: 'Text', City: 'Text', State: { type: 'Select', options: function (callback) { $.getJSON("/Application/GetStates/").done(callback); } }, ZipCode: 'Text', PhoneNumber: 'Text', DateOfBirth: 'Date', } }); Backbone.Form.setTemplates(template, PersonItem); //Collection var PersonList = Backbone.Collection.extend({ model: PersonItem , url: "/Application/PersonList" }); //Views var PersonItemView = Backbone.Form.extend({ tagName: "li", events: { 'click button.delete': 'remove', 'change input': 'change' }, initialize: function (options) { console.log("ItemView init"); PersonItemView.__super__.initialize.call(this, options); _.bindAll(this, 'render', 'remove'); console.log("ItemView set attr = " + options); }, render: function () { PersonItemView.__super__.render.call(this); $('fieldset', this.el).append("<button class=\"delete\" style=\"float: right;\">Delete</button>"); return this; }, change: function (event) { var target = event.target; console.log('changing ' + target.id + ' from: ' + target.defaultValue + ' to: ' + target.value); }, remove: function () { console.log("delete button pressed"); this.model.destroy({ success: function () { alert('person deleted successfully'); } }); return false; } }); var PersonListView = Backbone.View.extend({ el: $("#application_fieldset"), events: { 'click button#add': 'addPerson', 'click button#save': 'save2db' }, initialize: function () { console.log("PersonListView Constructor"); _.bindAll(this, 'render', 'addPerson', 'appendItem', 'save'); this.collection = new PersonList(); this.collection.bind('add', this.appendItem); //this.collection.fetch(); this.collection.add([new PersonItem()]); console.log("collection length = " + this.collection.length); }, render: function () { var self = this; console.log(this.collection.models); $(this.el).append("<button id='add'>Add Person</button>"); $(this.el).append("<button id='save'>Save</button>"); $(this.el).append("<fieldset><legend>Contact</legend><ul id=\"anchor_list\"></ul>"); _(this.collection.models).each(function (item) { self.appendItem(item); }, this); $(this.el).append("</fieldset>"); }, addPerson: function () { console.log("addPerson clicked"); var item = new PersonItem(); this.collection.add(item); }, appendItem: function (item) { var itemView = new PersonItemView({ model: item }); $('#anchor_list', this.el).append(itemView.render().el); }, save2db: function () { var self = this; console.log("PersonListView save"); _(this.collection.models).each(function (item) { console.log("item = " + item.toJSON()); var cid = item.cid; console.log("item.set"); item.set({ Title: $('#' + cid + '_Title').val(), Salutation: $('#' + cid + '_Salutation').val(), FirstName: $('#' + cid + '_FirstName').val(), LastName: $('#' + cid + '_LastName').val(), MiddleName: $('#' + cid + '_MiddleName').val(), NameSuffix: $('#' + cid + '_NameSuffix').val(), StreetAddress: $('#' + cid + '_StreetAddress').val(), City: $('#' + cid + '_City').val(), State: $('#' + cid + '_State').val(), ZipCode: $('#' + cid + '_ZipCode').val(), PhoneNumber: $('#' + cid + '_PhoneNumber').val(), DateOfBirth: $('#' + cid + '_DateOfBirth').find('input').val() }); if (item.isNew()) { console.log("item.isNew"); self.collection.create(item); } else { console.log("!item.isNew"); item.save(); } }); return false; } }); var personList = new PersonList(); var view = new PersonListView({ collection: personList }); personList.fetch({ success: function () { $("#application_fieldset").append(view.render()); } });

    Read the article

  • Creating Custom Ajax Control Toolkit Controls

    - by Stephen Walther
    The goal of this blog entry is to explain how you can extend the Ajax Control Toolkit with custom Ajax Control Toolkit controls. I describe how you can create the two halves of an Ajax Control Toolkit control: the server-side control extender and the client-side control behavior. Finally, I explain how you can use the new Ajax Control Toolkit control in a Web Forms page. At the end of this blog entry, there is a link to download a Visual Studio 2010 solution which contains the code for two Ajax Control Toolkit controls: SampleExtender and PopupHelpExtender. The SampleExtender contains the minimum skeleton for creating a new Ajax Control Toolkit control. You can use the SampleExtender as a starting point for your custom Ajax Control Toolkit controls. The PopupHelpExtender control is a super simple custom Ajax Control Toolkit control. This control extender displays a help message when you start typing into a TextBox control. The animated GIF below demonstrates what happens when you click into a TextBox which has been extended with the PopupHelp extender. Here’s a sample of a Web Forms page which uses the control: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShowPopupHelp.aspx.cs" Inherits="MyACTControls.Web.Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html > <head runat="server"> <title>Show Popup Help</title> </head> <body> <form id="form1" runat="server"> <div> <act:ToolkitScriptManager ID="tsm" runat="server" /> <%-- Social Security Number --%> <asp:Label ID="lblSSN" Text="SSN:" AssociatedControlID="txtSSN" runat="server" /> <asp:TextBox ID="txtSSN" runat="server" /> <act:PopupHelpExtender id="ph1" TargetControlID="txtSSN" HelpText="Please enter your social security number." runat="server" /> <%-- Social Security Number --%> <asp:Label ID="lblPhone" Text="Phone Number:" AssociatedControlID="txtPhone" runat="server" /> <asp:TextBox ID="txtPhone" runat="server" /> <act:PopupHelpExtender id="ph2" TargetControlID="txtPhone" HelpText="Please enter your phone number." runat="server" /> </div> </form> </body> </html> In the page above, the PopupHelp extender is used to extend the functionality of the two TextBox controls. When focus is given to a TextBox control, the popup help message is displayed. An Ajax Control Toolkit control extender consists of two parts: a server-side control extender and a client-side behavior. For example, the PopupHelp extender consists of a server-side PopupHelpExtender control (PopupHelpExtender.cs) and a client-side PopupHelp behavior JavaScript script (PopupHelpBehavior.js). Over the course of this blog entry, I describe how you can create both the server-side extender and the client-side behavior. Writing the Server-Side Code Creating a Control Extender You create a control extender by creating a class that inherits from the abstract ExtenderControlBase class. For example, the PopupHelpExtender control is declared like this: public class PopupHelpExtender: ExtenderControlBase { } The ExtenderControlBase class is part of the Ajax Control Toolkit. This base class contains all of the common server properties and methods of every Ajax Control Toolkit extender control. The ExtenderControlBase class inherits from the ExtenderControl class. The ExtenderControl class is a standard class in the ASP.NET framework located in the System.Web.UI namespace. This class is responsible for generating a client-side behavior. The class generates a call to the Microsoft Ajax Library $create() method which looks like this: <script type="text/javascript"> $create(MyACTControls.PopupHelpBehavior, {"HelpText":"Please enter your social security number.","id":"ph1"}, null, null, $get("txtSSN")); }); </script> The JavaScript $create() method is part of the Microsoft Ajax Library. The reference for this method can be found here: http://msdn.microsoft.com/en-us/library/bb397487.aspx This method accepts the following parameters: type – The type of client behavior to create. The $create() method above creates a client PopupHelpBehavior. Properties – Enables you to pass initial values for the properties of the client behavior. For example, the initial value of the HelpText property. This is how server property values are passed to the client. Events – Enables you to pass client-side event handlers to the client behavior. References – Enables you to pass references to other client components. Element – The DOM element associated with the client behavior. This will be the DOM element associated with the control being extended such as the txtSSN TextBox. The $create() method is generated for you automatically. You just need to focus on writing the server-side control extender class. Specifying the Target Control All Ajax Control Toolkit extenders inherit a TargetControlID property from the ExtenderControlBase class. This property, the TargetControlID property, points at the control that the extender control extends. For example, the Ajax Control Toolkit TextBoxWatermark control extends a TextBox, the ConfirmButton control extends a Button, and the Calendar control extends a TextBox. You must indicate the type of control which your extender is extending. You indicate the type of control by adding a [TargetControlType] attribute to your control. For example, the PopupHelp extender is declared like this: [TargetControlType(typeof(TextBox))] public class PopupHelpExtender: ExtenderControlBase { } The PopupHelp extender can be used to extend a TextBox control. If you try to use the PopupHelp extender with another type of control then an exception is thrown. If you want to create an extender control which can be used with any type of ASP.NET control (Button, DataView, TextBox or whatever) then use the following attribute: [TargetControlType(typeof(Control))] Decorating Properties with Attributes If you decorate a server-side property with the [ExtenderControlProperty] attribute then the value of the property gets passed to the control’s client-side behavior. The value of the property gets passed to the client through the $create() method discussed above. The PopupHelp control contains the following HelpText property: [ExtenderControlProperty] [RequiredProperty] public string HelpText { get { return GetPropertyValue("HelpText", "Help Text"); } set { SetPropertyValue("HelpText", value); } } The HelpText property determines the help text which pops up when you start typing into a TextBox control. Because the HelpText property is decorated with the [ExtenderControlProperty] attribute, any value assigned to this property on the server is passed to the client automatically. For example, if you declare the PopupHelp extender in a Web Form page like this: <asp:TextBox ID="txtSSN" runat="server" /> <act:PopupHelpExtender id="ph1" TargetControlID="txtSSN" HelpText="Please enter your social security number." runat="server" />   Then the PopupHelpExtender renders the call to the the following Microsoft Ajax Library $create() method: $create(MyACTControls.PopupHelpBehavior, {"HelpText":"Please enter your social security number.","id":"ph1"}, null, null, $get("txtSSN")); You can see this call to the JavaScript $create() method by selecting View Source in your browser. This call to the $create() method calls a method named set_HelpText() automatically and passes the value “Please enter your social security number”. There are several attributes which you can use to decorate server-side properties including: ExtenderControlProperty – When a property is marked with this attribute, the value of the property is passed to the client automatically. ExtenderControlEvent – When a property is marked with this attribute, the property represents a client event handler. Required – When a value is not assigned to this property on the server, an error is displayed. DefaultValue – The default value of the property passed to the client. ClientPropertyName – The name of the corresponding property in the JavaScript behavior. For example, the server-side property is named ID (uppercase) and the client-side property is named id (lower-case). IDReferenceProperty – Applied to properties which refer to the IDs of other controls. URLProperty – Calls ResolveClientURL() to convert from a server-side URL to a URL which can be used on the client. ElementReference – Returns a reference to a DOM element by performing a client $get(). The WebResource, ClientResource, and the RequiredScript Attributes The PopupHelp extender uses three embedded resources named PopupHelpBehavior.js, PopupHelpBehavior.debug.js, and PopupHelpBehavior.css. The first two files are JavaScript files and the final file is a Cascading Style sheet file. These files are compiled as embedded resources. You don’t need to mark them as embedded resources in your Visual Studio solution because they get added to the assembly when the assembly is compiled by a build task. You can see that these files get embedded into the MyACTControls assembly by using Red Gate’s .NET Reflector tool: In order to use these files with the PopupHelp extender, you need to work with both the WebResource and the ClientScriptResource attributes. The PopupHelp extender includes the following three WebResource attributes. [assembly: WebResource("PopupHelp.PopupHelpBehavior.js", "text/javascript")] [assembly: WebResource("PopupHelp.PopupHelpBehavior.debug.js", "text/javascript")] [assembly: WebResource("PopupHelp.PopupHelpBehavior.css", "text/css", PerformSubstitution = true)] These WebResource attributes expose the embedded resource from the assembly so that they can be accessed by using the ScriptResource.axd or WebResource.axd handlers. The first parameter passed to the WebResource attribute is the name of the embedded resource and the second parameter is the content type of the embedded resource. The PopupHelp extender also includes the following ClientScriptResource and ClientCssResource attributes: [ClientScriptResource("MyACTControls.PopupHelpBehavior", "PopupHelp.PopupHelpBehavior.js")] [ClientCssResource("PopupHelp.PopupHelpBehavior.css")] Including these attributes causes the PopupHelp extender to request these resources when you add the PopupHelp extender to a page. If you open View Source in a browser which uses the PopupHelp extender then you will see the following link for the Cascading Style Sheet file: <link href="/WebResource.axd?d=0uONMsWXUuEDG-pbJHAC1kuKiIMteQFkYLmZdkgv7X54TObqYoqVzU4mxvaa4zpn5H9ch0RDwRYKwtO8zM5mKgO6C4WbrbkWWidKR07LD1d4n4i_uNB1mHEvXdZu2Ae5mDdVNDV53znnBojzCzwvSw2&amp;t=634417392021676003" type="text/css" rel="stylesheet" /> You also will see the following script include for the JavaScript file: <script src="/ScriptResource.axd?d=pIS7xcGaqvNLFBvExMBQSp_0xR3mpDfS0QVmmyu1aqDUjF06TrW1jVDyXNDMtBHxpRggLYDvgFTWOsrszflZEDqAcQCg-hDXjun7ON0Ol7EXPQIdOe1GLMceIDv3OeX658-tTq2LGdwXhC1-dE7_6g2&amp;t=ffffffff88a33b59" type="text/javascript"></script> The JavaScrpt file returned by this request to ScriptResource.axd contains the combined scripts for any and all Ajax Control Toolkit controls in a page. By default, the Ajax Control Toolkit combines all of the JavaScript files required by a page into a single JavaScript file. Combining files in this way really speeds up how quickly all of the JavaScript files get delivered from the web server to the browser. So, by default, there will be only one ScriptResource.axd include for all of the JavaScript files required by a page. If you want to disable Script Combining, and create separate links, then disable Script Combining like this: <act:ToolkitScriptManager ID="tsm" runat="server" CombineScripts="false" /> There is one more important attribute used by Ajax Control Toolkit extenders. The PopupHelp behavior uses the following two RequirdScript attributes to load the JavaScript files which are required by the PopupHelp behavior: [RequiredScript(typeof(CommonToolkitScripts), 0)] [RequiredScript(typeof(PopupExtender), 1)] The first parameter of the RequiredScript attribute represents either the string name of a JavaScript file or the type of an Ajax Control Toolkit control. The second parameter represents the order in which the JavaScript files are loaded (This second parameter is needed because .NET attributes are intrinsically unordered). In this case, the RequiredScript attribute will load the JavaScript files associated with the CommonToolkitScripts type and the JavaScript files associated with the PopupExtender in that order. The PopupHelp behavior depends on these JavaScript files. Writing the Client-Side Code The PopupHelp extender uses a client-side behavior written with the Microsoft Ajax Library. Here is the complete code for the client-side behavior: (function () { // The unique name of the script registered with the // client script loader var scriptName = "PopupHelpBehavior"; function execute() { Type.registerNamespace('MyACTControls'); MyACTControls.PopupHelpBehavior = function (element) { /// <summary> /// A behavior which displays popup help for a textbox /// </summmary> /// <param name="element" type="Sys.UI.DomElement">The element to attach to</param> MyACTControls.PopupHelpBehavior.initializeBase(this, [element]); this._textbox = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(element); this._cssClass = "ajax__popupHelp"; this._popupBehavior = null; this._popupPosition = Sys.Extended.UI.PositioningMode.BottomLeft; this._popupDiv = null; this._helpText = "Help Text"; this._element$delegates = { focus: Function.createDelegate(this, this._element_onfocus), blur: Function.createDelegate(this, this._element_onblur) }; } MyACTControls.PopupHelpBehavior.prototype = { initialize: function () { MyACTControls.PopupHelpBehavior.callBaseMethod(this, 'initialize'); // Add event handlers for focus and blur var element = this.get_element(); $addHandlers(element, this._element$delegates); }, _ensurePopup: function () { if (!this._popupDiv) { var element = this.get_element(); var id = this.get_id(); this._popupDiv = $common.createElementFromTemplate({ nodeName: "div", properties: { id: id + "_popupDiv" }, cssClasses: ["ajax__popupHelp"] }, element.parentNode); this._popupBehavior = new $create(Sys.Extended.UI.PopupBehavior, { parentElement: element }, {}, {}, this._popupDiv); this._popupBehavior.set_positioningMode(this._popupPosition); } }, get_HelpText: function () { return this._helpText; }, set_HelpText: function (value) { if (this._HelpText != value) { this._helpText = value; this._ensurePopup(); this._popupDiv.innerHTML = value; this.raisePropertyChanged("Text") } }, _element_onfocus: function (e) { this.show(); }, _element_onblur: function (e) { this.hide(); }, show: function () { this._popupBehavior.show(); }, hide: function () { if (this._popupBehavior) { this._popupBehavior.hide(); } }, dispose: function() { var element = this.get_element(); $clearHandlers(element); if (this._popupBehavior) { this._popupBehavior.dispose(); this._popupBehavior = null; } } }; MyACTControls.PopupHelpBehavior.registerClass('MyACTControls.PopupHelpBehavior', Sys.Extended.UI.BehaviorBase); Sys.registerComponent(MyACTControls.PopupHelpBehavior, { name: "popupHelp" }); } // execute if (window.Sys && Sys.loader) { Sys.loader.registerScript(scriptName, ["ExtendedBase", "ExtendedCommon"], execute); } else { execute(); } })();   In the following sections, we’ll discuss how this client-side behavior works. Wrapping the Behavior for the Script Loader The behavior is wrapped with the following script: (function () { // The unique name of the script registered with the // client script loader var scriptName = "PopupHelpBehavior"; function execute() { // Behavior Content } // execute if (window.Sys && Sys.loader) { Sys.loader.registerScript(scriptName, ["ExtendedBase", "ExtendedCommon"], execute); } else { execute(); } })(); This code is required by the Microsoft Ajax Library Script Loader. You need this code if you plan to use a behavior directly from client-side code and you want to use the Script Loader. If you plan to only use your code in the context of the Ajax Control Toolkit then you can leave out this code. Registering a JavaScript Namespace The PopupHelp behavior is declared within a namespace named MyACTControls. In the code above, this namespace is created with the following registerNamespace() method: Type.registerNamespace('MyACTControls'); JavaScript does not have any built-in way of creating namespaces to prevent naming conflicts. The Microsoft Ajax Library extends JavaScript with support for namespaces. You can learn more about the registerNamespace() method here: http://msdn.microsoft.com/en-us/library/bb397723.aspx Creating the Behavior The actual Popup behavior is created with the following code. MyACTControls.PopupHelpBehavior = function (element) { /// <summary> /// A behavior which displays popup help for a textbox /// </summmary> /// <param name="element" type="Sys.UI.DomElement">The element to attach to</param> MyACTControls.PopupHelpBehavior.initializeBase(this, [element]); this._textbox = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(element); this._cssClass = "ajax__popupHelp"; this._popupBehavior = null; this._popupPosition = Sys.Extended.UI.PositioningMode.BottomLeft; this._popupDiv = null; this._helpText = "Help Text"; this._element$delegates = { focus: Function.createDelegate(this, this._element_onfocus), blur: Function.createDelegate(this, this._element_onblur) }; } MyACTControls.PopupHelpBehavior.prototype = { initialize: function () { MyACTControls.PopupHelpBehavior.callBaseMethod(this, 'initialize'); // Add event handlers for focus and blur var element = this.get_element(); $addHandlers(element, this._element$delegates); }, _ensurePopup: function () { if (!this._popupDiv) { var element = this.get_element(); var id = this.get_id(); this._popupDiv = $common.createElementFromTemplate({ nodeName: "div", properties: { id: id + "_popupDiv" }, cssClasses: ["ajax__popupHelp"] }, element.parentNode); this._popupBehavior = new $create(Sys.Extended.UI.PopupBehavior, { parentElement: element }, {}, {}, this._popupDiv); this._popupBehavior.set_positioningMode(this._popupPosition); } }, get_HelpText: function () { return this._helpText; }, set_HelpText: function (value) { if (this._HelpText != value) { this._helpText = value; this._ensurePopup(); this._popupDiv.innerHTML = value; this.raisePropertyChanged("Text") } }, _element_onfocus: function (e) { this.show(); }, _element_onblur: function (e) { this.hide(); }, show: function () { this._popupBehavior.show(); }, hide: function () { if (this._popupBehavior) { this._popupBehavior.hide(); } }, dispose: function() { var element = this.get_element(); $clearHandlers(element); if (this._popupBehavior) { this._popupBehavior.dispose(); this._popupBehavior = null; } } }; The code above has two parts. The first part of the code is used to define the constructor function for the PopupHelp behavior. This is a factory method which returns an instance of a PopupHelp behavior: MyACTControls.PopupHelpBehavior = function (element) { } The second part of the code modified the prototype for the PopupHelp behavior: MyACTControls.PopupHelpBehavior.prototype = { } Any code which is particular to a single instance of the PopupHelp behavior should be placed in the constructor function. For example, the default value of the _helpText field is assigned in the constructor function: this._helpText = "Help Text"; Any code which is shared among all instances of the PopupHelp behavior should be added to the PopupHelp behavior’s prototype. For example, the public HelpText property is added to the prototype: get_HelpText: function () { return this._helpText; }, set_HelpText: function (value) { if (this._HelpText != value) { this._helpText = value; this._ensurePopup(); this._popupDiv.innerHTML = value; this.raisePropertyChanged("Text") } }, Registering a JavaScript Class After you create the PopupHelp behavior, you must register the behavior as a class by using the Microsoft Ajax registerClass() method like this: MyACTControls.PopupHelpBehavior.registerClass('MyACTControls.PopupHelpBehavior', Sys.Extended.UI.BehaviorBase); This call to registerClass() registers PopupHelp behavior as a class which derives from the base Sys.Extended.UI.BehaviorBase class. Like the ExtenderControlBase class on the server side, the BehaviorBase class on the client side contains method used by every behavior. The documentation for the BehaviorBase class can be found here: http://msdn.microsoft.com/en-us/library/bb311020.aspx The most important methods and properties of the BehaviorBase class are the following: dispose() – Use this method to clean up all resources used by your behavior. In the case of the PopupHelp behavior, the dispose() method is used to remote the event handlers created by the behavior and disposed the Popup behavior. get_element() -- Use this property to get the DOM element associated with the behavior. In other words, the DOM element which the behavior extends. get_id() – Use this property to the ID of the current behavior. initialize() – Use this method to initialize the behavior. This method is called after all of the properties are set by the $create() method. Creating Debug and Release Scripts You might have noticed that the PopupHelp behavior uses two scripts named PopupHelpBehavior.js and PopupHelpBehavior.debug.js. However, you never create these two scripts. Instead, you only create a single script named PopupHelpBehavior.pre.js. The pre in PopupHelpBehavior.pre.js stands for preprocessor. When you build the Ajax Control Toolkit (or the sample Visual Studio Solution at the end of this blog entry), a build task named JSBuild generates the PopupHelpBehavior.js release script and PopupHelpBehavior.debug.js debug script automatically. The JSBuild preprocessor supports the following directives: #IF #ELSE #ENDIF #INCLUDE #LOCALIZE #DEFINE #UNDEFINE The preprocessor directives are used to mark code which should only appear in the debug version of the script. The directives are used extensively in the Microsoft Ajax Library. For example, the Microsoft Ajax Library Array.contains() method is created like this: $type.contains = function Array$contains(array, item) { //#if DEBUG var e = Function._validateParams(arguments, [ {name: "array", type: Array, elementMayBeNull: true}, {name: "item", mayBeNull: true} ]); if (e) throw e; //#endif return (indexOf(array, item) >= 0); } Notice that you add each of the preprocessor directives inside a JavaScript comment. The comment prevents Visual Studio from getting confused with its Intellisense. The release version, but not the debug version, of the PopupHelpBehavior script is also minified automatically by the Microsoft Ajax Minifier. The minifier is invoked by a build step in the project file. Conclusion The goal of this blog entry was to explain how you can create custom AJAX Control Toolkit controls. In the first part of this blog entry, you learned how to create the server-side portion of an Ajax Control Toolkit control. You learned how to derive a new control from the ExtenderControlBase class and decorate its properties with the necessary attributes. Next, in the second part of this blog entry, you learned how to create the client-side portion of an Ajax Control Toolkit control by creating a client-side behavior with JavaScript. You learned how to use the methods of the Microsoft Ajax Library to extend your client behavior from the BehaviorBase class. Download the Custom ACT Starter Solution

    Read the article

< Previous Page | 3 4 5 6 7 8  | Next Page >