I was wondering how to set properties at design-time, I am not sure if I am asking for the correct thing so I will demonstrate what I mean. In HTML View of an aspx page say I have a control <asp:Label runat="server" Text='<%#Bind("FooBar")%>" /> What I want to do is have my custom designer or custom editor to actually set the <%#Bind("FooBar")%> part for the Text property. so when I switch to HTML view I will see the Text property will have this value after my designer/editor has been used. Is this possible, and if so what do I need to know, what steps do I need to take in order to do this for any property? regards Fluxtah -- modified at 6:12 Wednesday 1st February, 2006 Well I manged to get something going with the ContainerControlDesigner but now I am stuck with getting my custom Editor and Designer to interact, maybe I need to make my Editor output whatever to the property its editing then make the Designer pick up that property and process it into some kind of structure to write to the designer... any help on this, will still be much appreciated!
fluxtah
Posts
-
Setting Properties at design time -
Appointment Reminder Alert/Notification?I am not familiar with ICalendar however I would ask the person(s) you are building it for how they expect to receive reminders. I actually did the javascript one for a system and told the client that it was unreliable if you are not logged into the system and they accepted that issue. You could always make MS Office Outlook the only email client your system supports to begin with and then try to support other ones in the future. How about SMS messaging? then they are sure to get it if they have their mobiles switched on. regards Fluxtah
-
How to get the Hidden Text Box value using 2.0Need more information, is the hidden field a server control or ordinary html hidden field. If its a server control you should be able to access it as normal string str = Hidden1.Text; if the field is not a server control then make sure the hidden field tags name attribute is Hidden1 -- modified at 15:05 Friday 27th January, 2006 Corrrection: string str = Hidden1.Value; regards Fluxtah
-
ASP.NET 2.0 Custom membership provider using NHibernateI am attempting to write a custom membership provider using NHibernate but come across a problem. With hibernate you need to instantiate and set up a Configuration object to get at an ISessionFactory interface, the problem is configuration is expensive to do for every database request so the usual thing to do is to configure it once then keep a static reference to the ISessionFactory. Whilst debugging my MembershipProvider using the website admin tool I noticed that Initialize() was called every time a new page loaded after the add user and update users features, considering I use the Initialize() method to configure hibernate and store a reference to an ISessionFactory interface I noticed that it was always re-creating the ISessionFactory. It states in the provider toolkit pages: Providers are loaded when the application using them first accesses a feature of the corresponding service, and they're instanced just once per application (that is, per application domain). The lifetime of a provider roughly equals the lifetime of the application, so one can safely write "stateful" providers that store state in fields. This one-instance-per-application model is convenient for persisting data across requests, but it has a downside. That downside is described in the next section. If this is the case then Initialize() is the perfect place to setup my NHibernate session factory. I was wondering if this is just the nature of the web admin tool considering it runs in as a different web application on a different port (in the visual studio development server). anyway, if anyone could shed some light on this I would be very happy to hear about it. regards Fluxtah
-
Random application restartsThere are two things I have experienced that caused restarts with ASP.NET First one was anti-virus software accessing the web.config file, which caused the app to restart killing all sessions. Another one, All over an application of mine I built a while back I was storing information in cookies, client-side using javascript to keep state of some collapsible panel controls. Users were able to use the website but where randomly logged out, I disabled this feature and the problem went away. -- modified at 11:58 Friday 27th January, 2006