Click to See Complete Forum and Search --> : error
abhijan13
April 24th, 2008, 01:29 AM
actual code is
String ConnectionString = System.Configuration.ConfigurationManager.AppSettings["AddressDB"];
but i didnot found ConfiguartionManager after entering "System.Configuration."..
plz help.
thnks
foamy
April 24th, 2008, 01:34 AM
And the error message is...?
post it, please
boudino
April 24th, 2008, 01:44 AM
Have you had included reference to System.Configuration.dll?
mariocatch
April 24th, 2008, 07:57 AM
He's entering a fully qualified name, doesn't have to include anything.
If you don't find ConfigurationManager class as part of System.Configuration namespace, then the ConfigurationManager class doesn't exist in the System.Configuration namespace.
.NET won't lie to you... (although intellisense may lie so don't trust it... try yourself by compiling your code and see if it compiles... intellisense doesnt always tell the truth).
boudino
April 24th, 2008, 08:52 AM
He's entering a fully qualified name, doesn't have to include anything.
Definitely not! A single namespace can spread over several assemblies.
What I'm talking about is assembly reference, not the using keyword.
So again, abhijan13, check, if you have added the reference to assembly System.Configuration.dll to you project. What version of VS do you use? What's the exact error message you receive?
abhijan13
April 24th, 2008, 09:13 AM
actual error message is-
'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: 'This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings' C:\Documents and Settings\Abilash\My Documents\Visual Studio 2005\Projects\WindowsApplication11\WindowsApplication11\AddressManager.cs 24 39 WindowsApplication11
abhijan13
April 24th, 2008, 09:17 AM
wil u plz tell me how we add this reference--
System.Configuration.dll?
abhijan13
April 25th, 2008, 01:44 AM
actual error message is-
'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: 'This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings' C:\Documents and Settings\Abilash\My Documents\Visual Studio 2005\Projects\WindowsApplication11\WindowsApplication11\AddressManager.cs 24 39 WindowsApplication11
Shuja Ali
April 25th, 2008, 02:27 AM
wil u plz tell me how we add this reference--
System.Configuration.dll?
:confused:
Open Project menu and select Add reference. In the resulting dialog look for System.Configuration. Select it and click ok.
abhijan13
April 27th, 2008, 08:36 AM
thanks..i gt the System.Configuration..:)
Mutant_Fruit
April 27th, 2008, 08:40 AM
actual error message is-
'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: 'This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings' C:\Documents and Settings\Abilash\My Documents\Visual Studio 2005\Projects\WindowsApplication11\WindowsApplication11\AddressManager.cs 24 39 WindowsApplication11
That's a warning message, not an error message. It's also pretty self-explanatory. The method you're using is depreciated. There's a newer method available for getting the same information, and you should use that instead.
abhijan13
April 27th, 2008, 08:44 AM
error again..
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
dataGridView1.Select(dataGridView1.CurrentRow.Index);
LoadCurrentItem();
SetEditState(false);
}
Error is--" No OverLoad for Method 'Select' takes '1' argument
abhijan13
April 27th, 2008, 08:45 AM
error again..
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
dataGridView1.Select(dataGridView1.CurrentRow.Index);
LoadCurrentItem();
SetEditState(false);
}
Error is--" No OverLoad for Method 'Select' takes '1' argument
Shuja Ali
April 27th, 2008, 11:25 AM
Did you try to check what MSDN says about the Select method. I wonder, why people do not check the documentation before relying on others to resolve the problem.
Your first reference should be MSDN. After all MS is the one who created .NET Framework so their documentation should be the one that you should refer. And if you still don't understand something you can always post it here.
You should also use CODE tags. Refer our FAQ or look at my signature.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.