---
title: "How to show/display message box in C# asp.net forms?"  
description: "How to show/display message box in C# asp.net forms?"  
author: "Takeshi Okada"  
published: 2014-12-19  
updated: 2014-12-20  
canonical: https://www.mindstick.com/forum/12797/how-to-show-display-message-box-in-c-sharp-asp-dot-net-forms  
category: "asp.net"  
tags: ["c#"]  
reading_time: 1 minute  

---

# How to show/display message box in C# asp.net forms?

I want to [add](https://www.mindstick.com/forum/12983/add-address-in-textbox-when-page-is-load-and-if-i-search-address-in-textbox-show-in-map-by-javascript)/show some [message](https://www.mindstick.com/forum/12802/show-confirmation-message-yes-or-no-in-asp-dot-net) with a OK [button](https://www.mindstick.com/articles/63/how-to-add-button-in-datagridview-in-csharp-dot-net) in c# [asp.net](https://www.mindstick.com/articles/934/default-folders-available-inside-the-asp-dot-net-application-folder) without using the windows.forms [name](https://yourviews.mindstick.com/view/87450/how-to-generate-a-brand-name-using-linkedin-comprehensive-guide) space.

## Replies

### Reply by Mark M

One easy solution is to register some JavaScript code in your page:

string script = "alert(\"Hello!\");";

ScriptManager.RegisterStartupScript(this, GetType(),ServerControlScript", script, true);

### Reply by Anonymous User

Use:

string display = "Pop-up!";

ClientScript.RegisterStartupScript(this.GetType(), "yourMessage", "alert('" + display + "');", true);


---

Original Source: https://www.mindstick.com/forum/12797/how-to-show-display-message-box-in-c-sharp-asp-dot-net-forms

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
