Search Results

Search found 6 results on 1 pages for 'xabatcha'.

Page 1/1 | 1 

  • Bind NameValueCollection to GridView?

    - by Xabatcha
    What kind of collection I should use to convert NameValue collection to be bindable to GridView? When doing directly it didn't work. Code in aspx.cs private void BindList(NameValueCollection nvpList) { resultGV.DataSource = list; resultGV.DataBind(); } Code in aspx <asp:GridView ID="resultGV" runat="server" AutoGenerateColumns="False" Width="100%"> <Columns> <asp:BoundField DataField="Key" HeaderText="Key" /> <asp:BoundField DataField="Value" HeaderText="Value" /> </Columns> </asp:GridView> Any tip most welcome. Thanks. X.

    Read the article

  • Auto wiring of Property does not work for me

    - by Xabatcha
    Hi All, In my Asp.Net project I wanna use Property Auto-wiring, e.g. for my ILogger. Basically I placed Property into my base classes. One for Page, one for UserControl. Like below. public class UserControlBase : UserControl { public ILogger CLogger { get; set; } .... } However when calling in inherited control, logger is null. I checked the container and it'a definitely set. Below is setting which is called from Global.asax. public static void SetupForIoC() { Debug.WriteLine("SetupForIoC"); ObjectFactory.Initialize(x => { x.FillAllPropertiesOfType<ILogger>().TheDefaultIsConcreteType<EntLibLogger>().AsSingletons(); x.FillAllPropertiesOfType<ISiteService>().TheDefaultIsConcreteType<SiteService>().AsSingletons(); }); Debug.WriteLine(ObjectFactory.WhatDoIHave()); } Thanks for any advice, tip? X.

    Read the article

  • Unity setting problem when defined in code

    - by Xabatcha
    I have problem when asking for default ILogger from Unity container. I have this setting defined in code (its VB.net) Dim container As IUnityContainer ... container.RegisterType(Of ILogger, NullLogger)() container.RegisterType(Of ILogger, EntLibLogger)("EL") When I am getting ILogger from container I may have different name, like: Ioc.Resolve(Of ILogger)("MyLogger") However this raises error as the mapping is not set for 'MyLogger'. Can I force container to return type which was registered without name? Actually when I used setting from web.config it worked. Any tips most welcome. Thanks. Cheers, X.

    Read the article

1