|
"Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + Server.MapPath("../ExcelData.xls") + ";" +
"Extended Properties=Excel 8.0;";
|
|
|
|
|
How to read .xls file by giving the cell value and write the cellvalue in another .xls file at the same position using C#.net
Could u pls help me?
chandra999777
|
|
|
|
|
http://www.codeproject.com/csharp/excel_using_oledb.asp
|
|
|
|
|
Hi,
please help me out to check the CheckedListbox only one item at click, rest of the items should be unchecked.
|
|
|
|
|
It's easy :
Use the event CheckedChanged then write this kind of code :
Go to each item, checked whether the item is the item you just selected.
If yes, then set the property "Checked" to true, otherwise false;
|
|
|
|
|
i found the solution ,
CheckedIndex is previously selected item index.
private void chkProperties_ItemCheck(object sender, ItemCheckEventArgs e)
{
chkProperties.ItemCheck-=new ItemCheckEventHandler(chkProperties_ItemCheck);
chkProperties.SetItemChecked(CheckedIndex,false);
chkProperties.ItemCheck+=new ItemCheckEventHandler(chkProperties_ItemCheck);
CheckedIndex=e.Index;
}
|
|
|
|
|
hi,
maybe it's a stupid question, but i really need to know: is there a possibility to find out the amount of free space on a ftp server for an axisting account..? thanks
|
|
|
|
|
How many space you have - How many space you used = How many space is free
haha~
|
|
|
|
|
Thanks for the piece of code that u gave me yesterday, but I still have a problem. I need to create a USER INTERFACE PROGRAM that can LOAD,DISPLAY AND SAVE a bitmap file and I'm not really good in c# now so I can't really do it. Please if anybody can help me with that for now,I would be grateful. I need that for a project.
Please guys, help me out.
tony-yeyo
|
|
|
|
|
You should look at the System.Drawing.Image class. There you find routines to Load and Save an Image. To Display one, you can use a panel or picturebox.
So try it and when you have a specific question or problem with the classes or functions ask again.
Regards,
Ingo
------------------------------
PROST Roleplaying Game
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
Hi,
I´ve a designproblem how I shall compare values from two lists of data and finally store in a output. But the output is not the problem it is the mapping, comparing. For sure I can use a several of techniques for comparing data but Im looking for a optimal method in C# 2.0. Maybe I can use the generics List, Comparer etc...?
Ok, first I recieve a xml file via a webservice. I validate and transform it for prepering the mapping, see <sou<<<rcedatalist>. Second I get the mappingvalues from the database and bind to a List<>, xml!?!
It is the "SourceId" attribute I want to compare with a equal value from the second list. The SourceId is a generic attribute and e.g. "16481788" means street and "16481791" city, ok!?!
Below shows the sourcelist of data, the list of mapping values and a outputlist.
<br />
<br />
<SourceDataList><br />
<DataRow SourceId="16481788" value="21st street" dbType="string" /><br />
<DataRow SourceId="16481789" value="Manhattan" dbType="string" /><br />
<DataRow SourceId="16481790" value="2345" dbType="int" /><br />
<DataRow SourceId="16481791" value="New York" dbType="string" /><br />
</SourceDataList><br />
<br />
<MappingDataList><br />
<DataRow SourceId="16481788" DestId="21" /><br />
<DataRow SourceId="16481789" DestId="22" /><br />
<DataRow SourceId="16481790" DestId="23" /><br />
<DataRow SourceId="16481791" DestId="24" /><br />
</MappingDataList><br />
<br />
<OutputDataList><br />
<DataRow DestId="21" value="21st street" /><br />
<DataRow DestId="22" value="Manhattan" /><br />
<DataRow DestId="23" value="2345" /><br />
<DataRow DestId="24" value="New York" /><br />
</OutputDataList><br />
<br />
These three list only show the structure. I can treat them in any suitable format, e.g. generic lists etc. Maybe in performance purpose I want to make i xml batch insert into the database.
List1 List2 = XmlStream > Database
I hope you have good tips out there
Best regards
//Albin Malmgren
|
|
|
|
|
I'm sorry if this has been asked before - I have spent some time searching and not found an answer...
My question is this : I have developed a Usercontrol in C# / Winforms that is intended to be a child control of certain other controls, not developed by me. Is there any way that my control can 'listen' to it's parents events (specifically mouse events) and respond to them?? This seems like it should be trivial but I'm drawing a blank (too much PHP probably
Thanks in advance
Ian Roberts
|
|
|
|
|
Control does have a Parent property. Did you try accessing that property and subscribing to its events?
|
|
|
|
|
Hi,
I have created a control, and added event handling capabilty throught delegates.
Now the problem here is, i want to use this control as a ActiveX control and i am unable to find a way to handle the events on the web page???
P.S. i have tried my control in windows application, it works fine! Also i have used delegates to expose my control's events for outside world, if you have a better( rather another) way i would love to see that.
Thanks in anticipation
|
|
|
|
|
hi frnds
i am using .net 2003, i want to change the font of each item in the listbox in c#.its a windows application.
i think i am clear to u all.
just in brief i am explaining the problem once more.
the items that are added in the listbox should've different fonts and sizes.
Thanks in advance.plz solve it ASAP.
bye
nauty
|
|
|
|
|
|
i think you need a 3side Controls to help you
|
|
|
|
|
hi guys!
need some help.
i m deploying a .net application using the .net setup project and also using the installer class to add some custom actions every thing is running fine..
but i want to rollback the setup if a condition does not matches.. for which i m using the
base.rollback(isavedstate) method but it gives an exception
that "savedstate might be corrupted" and then rollback the setup from the catch block..
i m searching for it from a long time but couldnt figured it out. can any one tell me what i m missing..
i wrote the code some what like this:
protected override void OnBeforeInstall(IDictionary savedState)<br />
{<br />
base.OnBeforeInstall (savedState);<br />
<br />
try<br />
{<br />
if(DialogResult.No==(MessageBox.Show("This Setup Will restart your Internet Infromation Service Mannager(IIS). Do you want to Continue ? ","Alert",MessageBoxButtons.YesNo,MessageBoxIcon.Hand)))<br />
{<br />
<br />
base.Rollback(savedState);<br />
return;<br />
<br />
}<br />
}<br />
catch(InstallException iex)<br />
{this.Rollback(savedState);<br />
<br />
}<br />
catch(Exception ex)<br />
{this.Rollback(savedState);<br />
}<br />
}
but it gets rollback in the catch block gining the error.
abhinav
|
|
|
|
|
Hello All,
Im Coding cluster Management functions in C# using the APIs. When I am trying to DLLImport for the API GetClusterGroupState as
I get an System.AccessViolationException that protected memory is accesses. Let me know the How shoud I use this API in c#. Here is my code.
[DllImport("clusapi.dll", EntryPoint = "GetClusterGroupState", SetLastError = true,
CharSet = CharSet.Unicode, ExactSpelling = false, CallingConvention = CallingConvention.StdCall),
SuppressUnmanagedCodeSecurityAttribute()]
internal static extern int GetClusterGroupState(
IntPtr hClusGroup,
out string strOwnerNode,
[MarshalAs(UnmanagedType.I4)] int nNodeNamebuf);
Thanks
|
|
|
|
|
Hi
Is it possible to show animated gif in DataGridViewImageCell?
It is need to use ImageAnimator in Paint event
ImageAnimator.Animate(image, new EventHandler(animate))
ImageAnimator.UpdateFrames();
but which method call in animate?
private void animate(object o, EventArgs e)
{
....
}
Any method which force Paint event? Which? Invalidate is not available for the cell.
Thanks for an advice
Ela
|
|
|
|
|
Hi Everybody.
does anybody knows why I can´t debug with framework 2.0.50727? even when I actived the "Enable Debug" option in the IIS configurations for ASP .NET, in "Edit Global Configuration" and in "Edit Configuration"?? I ran the aspnet_regiis.exe with the option "-i" but get nothing; I'm working in VS 2003 (7.1.3088).
Now I'm working with Framework 1.1.4233.
I need because I can´t access to the items of a ListBox after I bind it, but once I change to Framework 2.0.50727 and run it direct from my web browser I don´t have any problems.
Grettings and thanks for your help.
|
|
|
|
|
You cant debug .NET 2 with VS2003. You have to use cordbg or the GUI debugger included with the SDK or use Visual Studio Express.
|
|
|
|
|
Ok thanks, now I get it.;)
But anyways, what I commented about the ListBox, does anybody knows what about that (accessing the items after bind the control)?
|
|
|
|
|
I want to display the cpu and memory use ration on the dialog,but I don't know how to write the code?who can help me!
|
|
|
|
|
for this you have to use Windows Management Instrumentation (WMI) classes
Add Reference to System.Management Namaspace From AddReference OPtion of your Solution Explorer.
Luck is Opportunity with hardwork
|
|
|
|