|
Hi have a good day
<br />
string mysrt = "Hello {0}";<br />
<br />
Console.WriteLine ("Hello {0}" , "World");<br />
How I can do the above Code With MessageBox.Show ??
thank in advance
P.S:
I don't want to use The String.Replace
I know nothing , I know nothing ...
|
|
|
|
|
Stark DaFixzer wrote: I don't want to use The String.Replace
I don't want to copy the documentation.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Succinct and sarcastic. I like it!
CCC solved so far: 2 (including a Hard One!)
|
|
|
|
|
Console.WriteLine uses String.Format behind the scenes. Pass the normal parameters to String.Format, and show the return value using MessageBox.Show
|
|
|
|
|
Stark DaFixzer wrote: I don't want to use The String.Replace
Why? This is exactly what Console.Writline does.
CCC solved so far: 2 (including a Hard One!)
|
|
|
|
|
use like this ...
MessageBox.Show(String.Format(mystr , "world"));
|
|
|
|
|
Thank you so much ,
That is exactly what I need ,,
I know nothing , I know nothing ...
|
|
|
|
|
Most welcome budd...
|
|
|
|
|
MessageBox.Show(string.Format("Hello {0}" , "World"));
|
|
|
|
|
Thank you ,
I know nothing , I know nothing ...
|
|
|
|
|
Hi
I was trying to create a windows application that sends emails. Recently I installed windows 7 on my machine and added the IIS from the windows add/remove components. When my application tries to send email with smtp.send() method, I am always getting SMTP host was not specified. I read in the internet that windows 7 does not come with SMTP server so I installed SMTP server from hMailServer.com and tried.
Now I am getting SMTP authentication fails. Does anyone have have problems with windows 7.
Any Ideas please.
Thanks.
--
http://ashakthi.blogspot.com
http://kids-articles.blogspot.com
|
|
|
|
|
This has nothing to do with Windows 7. You need to consult the documentation on the STMP server you're using and properly set the thing up. You also need to provide credentials in your code to login to the SMTP so it can send your email.
|
|
|
|
|
Hi,
In the runtime, when I need to make an SQL connection to my local DB, it gives an error like below:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connection. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
It is weird because I'm not using a remote database. My DB file is under the root directory of the program.
Can anybody help?
note: I'm pretty sure that my connection string is correct
|
|
|
|
|
How do you connect to your SQL-Server? TCP/IP, NamedPipes, SharedMemory?
|
|
|
|
|
well, I'm not sure, I just added a DB in my project, created some tables, and now trying to reach those tables as
SqlConnection conn = null;
conn = new SqlConnection("Data Source=|DataDirectory|\\MyDatabase.sfd");
conn.Open(); <---- this is where the error points
|
|
|
|
|
Is the server running? Check all the services. Check if the user id and password you are providing has access to the database.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
I looked up the connection string from the app.config file and it did not have any connection parameters like id or password
"Data Source=|DataDirectory|\\MyDatabase.sfd"
I'm also not sure how to check these related services, as I explained to Covean, I added a DB to my project and I think it must have been running by default
:/
|
|
|
|
|
Maybe this article helps: http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
|
|
|
|
|
Use a SQLCeConnection [^] instead of a SQLConnection . You're connecting to a SQL CE database (*.sdf), not a SQL Server database (*.mdb). The latter one indeed requires a server
I are Troll
|
|
|
|
|
oh this might be the solution
YES IT IS!
THANK YOU!
and thanks to all others tried to help me
|
|
|
|
|
You're welcome
|
|
|
|
|
I am trying to host WCF web-service on GoDaddy.com, where I have web-site hosted in A-virtual directory and web-service hosted in B-virtual directory. Now, I am trying to access the files available in A-virtual directory from web service that is hosted on B-virtual directory and it gives me access denied error. But, If I copy the same files in B-virtual directory, I am able to access those files from web-service.
Now the question is, it's GoDaddy that is restricting this?? Can I solve this problem through code? If Yes, How? Or Do I need to contact GoDaddy to do it?? Or Do I need to purchase different kind of hosting account??
Thanks in advance.
|
|
|
|
|
|
Thanks for redirecting me to correct forum.
|
|
|
|
|
Hello
Can someone tell me how i can determine which element the mouse is hovering over on a page in a WebBrowser control?
So i want to do something like firebug element analyzer or ie select element by click.
Any thoughts on this?
Thanks
|
|
|
|