Dear members
i want to use a message box in web application with message box icon and message box buttons like ok cancel etc.
Thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jiteendra SampathiraoPosted Nov 11, 2010, 2:09 AM
Better to use Javascript. and Add the onclientclick property to your server control. In the javascript function use confirm("");
If you find my post helpful, Mark it as Answered or Rate the post.
Suthish NairPosted Nov 13, 2010, 11:56 AM
you can use jquery article or calling below code in every page
Jiteendra SampathiraoPosted Nov 13, 2010, 3:28 AM
This is the code for when click on link button:
LinkButton lnkDelete = default(LinkButton);
lnkDelete = (LinkButton)e.Row.FindControl("lnkDelete");
lnkDelete.Attributes.Add("onclick", "javascript:return confirm('Are you sure you want to delete this entry?')");
modify this to ur requirement:
---------------------------------------------------------------------------------
If you find my post helpful, Mark it as Answered or Rate the post.
Shailendra VermaPosted Nov 13, 2010, 3:11 AM
I have used like this
string message = "
alert( ' The weightage points are saved successfully in database ' );
";
if (!Page.IsStartupScriptRegistered("clientScript"))
{
Page.RegisterStartupScript("clientScript", message);
}
Manikavelu VelayuthamPosted Nov 11, 2010, 2:14 AM
There were lots of option to customize the message box.
You can have your own buttons in that message box, you can place the icons there, it will be like a modal dialog box.
You can also go for a modal as well as modelless dialog box.
Madhu KPosted Nov 11, 2010, 1:01 AM
Shailendra VermaPosted Nov 11, 2010, 12:26 AM
Thanks
Soft CornerPosted Nov 11, 2010, 12:06 AM
U need to add reference for message box. Add reference in solution explorer System.windows.forms.
then declare " using System.windows.forms" in ur program, u will get Messagebox.show() method.
let me knw if u want anything.