This property looks to be available for web applications with ASP.NET. I am working on a desktop application written in VB.NET 2003 and no such property exists for combobox.
Furthermore, the problem I describe is really weird and inconsistant : events like SelectionChangedEvent get fired despite the fact that I do not select anything. I just release the mouse button above the combobox scrollbar, which should not fire such event as no selection was already made. I suspect something got wrong on my machine and I need to reinstall VS and .NET. I hope not. Has anyone a suggestion ?
Yes, this is a peculiar problem which I've faced too. The event seems to fire when the control is initialized. I haven't really dug too deep into this, but one way to workaround this is to check for the SelectedIndex property. It's usually -1 or 0 when the event fires unwanted. Put your whole logic inside a if condition that checks for SelectedIndex > 0.
Dim DV As DataView<br />
Dim DVRow As DataRowView<br />
DV = ADO_BDGlobale.Tables(NOM_TBL_Enseigne).DefaultView<br />
DVRow = DV.AddNew<br />
DVRow("Libelle_Long") = " Toutes les enseignes"<br />
DVRow("Cod_Enseigne") = 0<br />
DV.Sort = "Cod_Enseigne"<br />
Me.ComboBox_PanelPV_Enseigne.DisplayMember = "Libelle_Long"<br />
Me.ComboBox_PanelPV_Enseigne.ValueMember = "Cod_Enseigne"<br />
Me.ComboBox_PanelPV_Enseigne.DataSource = DV<br />
1) The bug described before occurs (abnormal events during interaction with scrollbar)
2) The combobox item list does not get sorted first . After a few selections without the scrollbar, the combobox item list finally gets sorted ( !!!).
I've been looking at the configuration class and the connectionsettings property and have noticed that when I look at the zeroth element in the collection and then do a .name on it I get back something like "LocalSqlServer". I then get "data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" as the connection string value.
Is this some sort of default given automatically as part of this property or is it getting something from off my development machine?
VS.NET installation also installs the Express edition of SQL Server. If this is not true in your case, it's probably the ASP.NET User and Role management DB, guessing by the DB Name. You'll find the mdf in your App_Code directory.
Here's a new wrinkle... I put the code on a non dev machine and get the same results. Does anyone have any explaination to this behavior, because the only conclusion I can come to is that it's some kind of default?
There isn't any file. This is what happens when I just instantiate a configuration class object and then do an OpenExeConfiguration and specify a path. The HasFile property is set to false, which it should, since there isn't actually a file, but that this is all in memory. When I save the configuration it puts no connectionsettings section in the config file.
When I add a new setting on my own and then save it, it then saves only my setting and ignores the "default" setting. Is there a base config file someplace I should be looking at that settings are getting incorporated from also? This isn't a web application, but a workstation app.
OK. If there isn't any file, why are you using the ConfigurationManager??
There IS a default inherited ConnectionStringSetting in the ConfigurationManager, regardless if there is a config file or not. This is comming from the machine.config and machine.default files in C:\WINDOWS\Microsoft.NET\Framework\<version>\CONFIG.
To tell your COnfigurationManager to forget about the inherited connectionstrings, create a config file in your app and add your connection string like this:
The clear/ line will tell the ConfigurationManager to dump all of the ConnectionStringSetting boject it currently has, including the default one, and build a new collection from the rest of the connectionStrings section.
I was using the ability of the save method in the configuration class to save the memory version to file. The exmples I've seen use the configurationmanager to get the object of the configuration class since it has no constructors. If there is another method for getting a configuration class instance I'd certainly like to know about it.
Well, the machine.config file certainly explains it then.
My setup project is already installed on my system.I am rebuilding it without doing any modification.If I double clicks my installer package it shows the message that "some version of product is already there".
What can be the issue?
Actually I am installing some some project output files through this setup project. I just want to install the output files which i have updated.It is of no use to uninstall full project and again install it.
Is it possible to customize my progress dialog box in userinterface Editor.I need the functionality at installation time that shows which component is getting installed at that particular time.I want to display some label on progress dialog box which will show that information.I am not finding any property like that with dialog box.
can anyone recommend a book(s) that provides in depth coverage of .NET components, service providers etc. Preferably one that move beyond the developers perspective, i.e. recognises that folks in banks, hospitals etc, don't use an IDE to manage loans or schedule surgical staff rosters.
I am trying to index folders that are located in network in the MS Indeing server in ASP.Net c#. But when i call the method AddScope() providing the sharename ,folder path and the credentials it gives following exception:
System.Runtime.InteropServices.COMException (0x8004160A): Exception from HRESULT: 0x8004160A
at CIODMLib.ICatAdm.AddScope(String bstrScopeName, Boolean fExclude, Object vtLogon, Object vtPassword)
could you please tell what this exception about and how can i remove this to attain the desired functionality.
Thread.Sleep() blocks the current thread, so that cannot do any more processing for the specified time period, however due to the windows process scheduler other threads keep running (it doesn't hang the whole PC).
I know the thread is 'blocked' but does the CLR scheduler move the resources from that thread to another one to allow another thread to continue in place of the one that has just been blocked.
The reason i ask is that i'd like to use the Async DbExecute method with Thread.Sleep, but it would be completely pointless if it doesn't allow the underlying processor time to switch in the background to another thread for the duration of the sleep.
it hold that thread up until it re-activates
either in win or web
already in web the processor works parellarly with all client requests
it works in one page for a while and for example opens the DB connection and waiting data back in that stage it goes to another page and work and then get back to the first to continue when the databack then finish and goes to the second page to continue
this is more advanced technique than thread stop
the iis server who evaluates at which stage of code the processor can go to work in another page