|
hi
how to get the files name of a folder, and also of subfolders.
plz help me
rajeev kumar sharma
vri software pvt. ltd.
new delhi India
|
|
|
|
|
http://www.developerfusion.co.uk/show/4359/
Hope it helps.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Any problem with this link?? Why 1 vote?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hi Guys. I am writing a piece of code to extract data from an Access DB into a CSV file. Now, i want to inlcude int he below piece of code only records that are set to a certain value in a column. I.e. I want to extract only the records in the "EXPORTED" Column that have a value of 0. How do I do this in the below code? I think I masy have to add this in the foreach line but I am not sure how to do this. Can somebody please help me with this? I.e. I want to say,
foreach (DataRow dr in dt.Rows WHERE ["Exported"] == 0).
I am sure this is incorrect. How do I structure this correctly?
foreach (DataRow dr in dt.Rows)
{
for (int i = 0; i < iColCount; i++)
{
if (!Convert.IsDBNull(dr[i]))
{
sw.Write(dr[i].ToString());
}
if (i < iColCount - 1)
{
sw.Write(",");
}
}
sw.Write(sw.NewLine);
}
sw.Close();
"Live for today and let Tomorrow take care of itself"
|
|
|
|
|
Try this..
foreach (DataRow dr in dt.Rows)<br />
{ <br />
if(dr["EXPORTED"]==0)<br />
{ <br />
for (int i = 0; i < iColCount; i++) <br />
{ <br />
if (!Convert.IsDBNull(dr[i]))<br />
{ <br />
sw.Write(dr[i].ToString()); <br />
}<br />
if (i < iColCount - 1) <br />
{ <br />
sw.Write(","); <br />
} <br />
} <br />
sw.Write(sw.NewLine); <br />
} <br />
} <br />
sw.Close();
|
|
|
|
|
Thanks mate. I tried this.
Prateek G wrote: if(dr["EXPORTED"]==0)
It comes up with an error:"Operator '==' cannot be applied to operands of type 'object' ant 'int'
|
|
|
|
|
how to retrieve value from port (localport)
|
|
|
|
|
Hi,
I am developing an editor in C#.net. I've a rich text editor. What i need to do is that opening a file in rtf format. When i convert word document to rtf it extract the text but without proper formating. Will you please let me know anything that can help me to convert doc to rtf in same formating. It would be very nice of you.
|
|
|
|
|
Hi ,
My aim is to clear all the textboxes in my form . the code which i have given is working fine with the form but its not working properly with the tabcontrol textboxes if any one has any idea abt this then please do let me know
regards
sindhu tiwari
CODE ::::::
foreach(Control c in this.Controls)
if(c is TextBox)
( c as TextBox).Clear();
its me sid
|
|
|
|
|
sindhutiwari wrote: foreach(Control c in this.Controls)
if(c is TextBox)
( c as TextBox).Clear();
Hi,
here in this loop you have to check for tab control abd then you have to again loop for controls in tab control. like this
foreach(Control c in this.Controls)<br />
if(c is TextBox)<br />
( c as TextBox).Clear(); <br />
if(c is TabControl)<br />
{<br />
foreach(Control c1 in this.Controls)<br />
if(c1 is TextBox)<br />
( c1 as TextBox).Clear(); <br />
<br />
}<br />
Thanks,
Sun Rays
Rate this post if you like answer.
My Articles
|
|
|
|
|
thanks allot sir
its me sid
|
|
|
|
|
We are going to need to go on a field trip for this one.
Go to: http://finance.google.com/finance?q=.DJI%20.IXIC%20.INX
If that link doesn't work you can go to: http://finance.google.com/finance and click on the graph
on the right side of the page under "Market Summary"
What you see when you get there is a brilliant little flash applet that creates a real-time interactive graph. Play around with it a little. You can grab the sliders at the bottom of the graph and adjust the period of time that you want to look at. Pretty nifty.
I would love it if I could find either a .Net, MFC, Java (or even Flash) control/component/module/library that would allow me to have this sort of functionality in a stand alone application. The one at the link is made by Google apparently but I don't think they have released the source.
I have seen tons of graphing/charting libraries (nevron, dundas, dotnetcharting, ZedGraph, ChartFX...). None of them provide this interactive capability. Does anyone out there know of such a thing? I'll go commercial or free which ever provides the functionality.
If not, someone should make one. It's money in the bank.
|
|
|
|
|
maizhiming wrote: Does anyone out there know of such a thing?
Not sure. You named all the ones I use ( dundas, ChartFX, etc ).
maizhiming wrote: If not, someone should make one.
No kidding.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I found the flash code for the applet on the Google finance site. They call it a time-series graph and it is written in actionscript 3.
http://code.google.com/p/time-series-graph/
I don't know how to make standalone apps that embed flash so I am still looking for a .Net or MFC control. If anyone knows of a way to embed flash into a .Net or MFC application. I would love to know about it.
|
|
|
|
|
hi i have one doubt , i have one dropdownlist and i populating state_names from database, now my problem is i want to update to state_name ,plz.. tell me how can i do...( i means how to select state_name and send to database)..
thanks 2 all..
|
|
|
|
|
With SQL. The drop list is irrelevant, the way you update a database is always the same,
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i m using this code..
string strStateId = ddlStateID.SelectedItem.ToString();
and i have 10 statenames in dropdownlist but and i m selecting fifth statename but it is selected as a first statename only it is not taking fifth statename.. so now i want to send fifth statename, so wht can i do brother...
thanks 2 all..
|
|
|
|
|
If you have selected the 5th item and the 1st is being shown as selected, odds are this is an ASP.NET question and you're databinding the control in page load on postback.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I don't know that how are you binding your dropdownlist. But the proper way is to bind the dropdown as valuefield property is set by stateid and displayfield should be set by name of state. Now get ddl.selectedvalue and pass it to database and update by the help of value field. Hope this will help you.
Regards,
Arslan Ilyas
|
|
|
|
|
I used WebBrowser to get an html Document, in which there was a "Submit" button. I can get this HtmlElement. How to emulate a click in a program?
Call the elem's Click is invalid, cause it's a delegate , can only appear in the leftside of a + or +=.
Thanks.
|
|
|
|
|
I guess .PerformClick() is the answer!
|
|
|
|
|
No such method. I guess you are kidding me.
|
|
|
|
|
Hi All,
I don't know what my major malfunction is with C# and using some of it's GUI components. If someone would please explain to me what I am not understanding, I would be very appreciative.
According to TreeView.SelectedNode Property[^]:the specified node is scrolled into view and any parent nodes are expanded so that the specified node is visible. Below, I had to explicity set the previously SelectedNode to null to get the desired behavior. I'm spending hours wadding through documentation. When I believe I find the solution, it does not work. Most frustrating is that Remarks do not tell me why it does not work as expected. Could someone point me to the correct documentation? I really don't know what I am missing here. I am using version 2.0 of the Framework.
Thanks,
Jeff
if (0 == Tree.Nodes.Count) { return; }
TreeNode node = Tree.SelectedNode;
if (null == node) { return; }
Tree.SelectedNode = null;
Tree.BeginUpdate();
node.Expand();
Tree.EndUpdate();
Tree.SelectedNode = node;
|
|
|
|
|
Hello
I try to check if the database is empty or not, if it's i should begin a new sequence of Id when storing the new data.
else i should continue in the same sequence.
how can i check the data in the database with the dataAdapter, i try to count the row in the dataset after i fill it but ut always return 1, if i have no data or if i have just one row of data.
This an example:
"
if (c.ds.Tables["TransID"].Rows.Count.ToString() == "0")<br />
TrID = 1;<br />
else<br />
foreach (DataRow r in c.ds.Tables["TransID"].Rows)<br />
{<br />
TrID = int.Parse(r["TransID"].ToString()) + 1; <br />
} "
Assaf
|
|
|
|
|
If you can take help of SqlDataReader it might help you to do this. it has function call HasRow.....
I hope can help...
Thanks
"Good Thing Goes With Good People..."
|
|
|
|