.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Windows Application >> Post New QuestionBookmark and Share Subscribe to Forum

About Message box display

Posted By: subash     Posted Date: June 11, 2009    Points:2   Category :Windows Application
Hi,
I want to display series of string values in The Message box
For Example.
Let us take string1,string2,string3,string5 are the values.
I want to display in YES or No Message box as "Are You want to save the changes in string1,string2,string3" .How it is possible.Then String1,string2,string3 are taken from fronend textbox values dynamically.
So please help me with possible code against this
Thanks
Subash

Responses
Author: Amit Mehra             
Posted Date: June 11, 2009     Points: 5   

hi,
try like this to save the text box value on confirmation

if (DialogResult.Yes == MessageBox.Show("Are You want to save the changes in" + textBox1.Text.Trim() + "," + textBox1.Text.Trim() + "," + textBox1.Text.Trim(), "Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
{
//your save logic goes here
}


Thanks,
Amit
Please "Mark As Answer " if this post help you.
Author: Santosh             
Posted Date: October 08, 2009     Points: 5   

hi

follow below VB.NET Code


If (MessageBox.Show("Do You Really Want To Delete The Record", "Information",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) =
Windows.Forms.DialogResult.Yes) Then

MessageBox.Show("UR MESSAGE")
else
Exit Sub
End if

Regards
Santosh
http://santoshdotnetarena.blogspot.com/

Author: Narayanan             
Posted Date: April 09, 2012     Points: 20   

Hi,
just try this sample Code
    for (int index = 0; index < 3; index++)
{
string strg;
strg = txt.Text;
if (strg == "")
str = strg;
else
str = strg + " " + str;
}
string Messagevalue = str ;
string result = "Are You want to save the changes " + Messagevalue ;
MessageBox.Show(result,"" , MessageBoxButtons.YesNo);


Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend