|
thanks mr
but i nbefor set my Question i Search for this Subject In Google
i Wount to convert this datatable to excel in desktop application not in web application
Thaer
|
|
|
|
|
|
Programm3r wrote: string[] linesOne = File.ReadAllLines("C:\\TEST ZTMEDATA 1.txt").ToString().Split(new Char[] { ',' });
string[] linesOne = File.ReadAllLines("C:\\TEST ZTMEDATA 1.txt").ToString().Split(','); ??
|
|
|
|
|
the result of File.ReadAllLines("C:\\TEST ZTMEDATA 1.txt").ToString() is "System.String[]"
Less lines of code != easiest way.
modified on Thursday, December 13, 2007 3:41:49 AM
|
|
|
|
|
ReadAllLines returns an array of strings, on which ToString returns a type name, "System.String[]". You should rather use ReadAllText, which returns a string straight away.
|
|
|
|
|
|
can we draw lines in autocad file from windows application
devi
|
|
|
|
|
Maybe with a third-party library (is such exists) or if you understand th dwg format and modify it directly in binary mode.
Anyway, you will have more chances to get an answer if you post this on Autodesk's forum.
|
|
|
|
|
I using ASP.NET 2.0 to try and send email, but i keep op getting this error "Failure sending email", "Unable to connect to remote server"
Here is my code to send email
try
{
System.Net.Mail.SmtpClient smtpClient = new System.Net.Mail.SmtpClient(mailServer);
smtpClient.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
smtpClient.Credentials = new System.Net.NetworkCredential("username", "pass");
smtpClient.Send(from, to, "Test Email", "Test Body");
}
catch(Exception ex)
{
throw new Exception("Error sending email: " + ex.Message);
}
Please help....
|
|
|
|
|
Are you using the right mailServer-address? Is the server running?
Do you have some kind of virus scanner at work (some scanners block the outgoing smtp-ports to stop mass-mail worms and spam bots) - or some kind of softwarefirewall, .... the list goes on (it's no problem with the code as far as I can see)
|
|
|
|
|
The server is running as i can send and recieve email via outlook, and i have McAfee 3.6.0.569 running on my PC
Is the a way a can configure the virus scan not to block outgoing mails
|
|
|
|
|
Outlook is not sending over the SMTP-ports so this don't have to say much.
McAfee might block outgoing mails (search for Port rules or try to deactivate it).
|
|
|
|
|
Soneliso wrote: smtpClient.Credentials = new System.Net.NetworkCredential("username", "pass");
Are you actually using these values?
Small angry dogs
|
|
|
|
|
No i am using my domain username and password
|
|
|
|
|
Hi All,
I need to replace words in TEXT BOX of MS WORD, how can I do this?
I tried:
Microsoft.Office.Interop.Word.Application oWordApplic = docxapp;
oWordApplic.ActiveDocument.Content.Find.Execute(ref findtext, ref findmatchcase, ref findmatchwholeword, ref findmatchwildcards, ref findmatchsoundslike, ref findmatchallwordforms, ref findforward, ref findwrap, ref findformat, ref findreplacement, ref findreplace, ref varMissing, ref varMissing, ref varMissing, ref varMissing);
With the above method, I can only replace word in TABLE and DOCUMENT. When I wanted to replace those in textbox in the documents, it failed.
Can you give me a suggestion? Thank in advance.
|
|
|
|
|
have you looked through all of the documentation for Interop?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hello everybody ,
I want to set a option for exit the application (Console). what should be the code for that?
Dipak
|
|
|
|
|
|
Thank you for help :
Environment.Exit(1) is working. but what is 1.
Application.Quit() is NOT working. Application is not available.
Thank you.
Dipak
|
|
|
|
|
'1' is the exit code which will be supplied to the the operating system.
|
|
|
|
|
Pass 0 to Environment.Exit() if it's a normal exit; use a non-zero value *only* if it's abnormal.
Cheers,
Vikram.
"If a trend is truly global, then that trend ought to be visible across ANY subset of that data" - fat_boy
|
|
|
|
|
|
If you are in the Main method you can also use return;
|
|
|
|
|
Good Morning everybody,
In console base application when i use Console.Write() or Console.WriteLine(), these writes simple text. Is it possible to write Bold text, underlined text or Italic text?
Dipak
|
|
|
|
|
Not on the console.
You can do it in a Rich textbox in a Winforms app though.
Cheers,
Vikram.
"If a trend is truly global, then that trend ought to be visible across ANY subset of that data" - fat_boy
|
|
|
|