| | |
how to display the message box in asp.net
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: May 2008
Posts: 144
Reputation:
Solved Threads: 9
Try to following code and it's insert after your connection string code.
•
•
•
•
Dim strMessage As String
strMessage = "Connection is Created"
'finishes server processing, returns to client.
Dim strScript As String = "<script language=JavaScript>"
strScript += "alert(""" & strMessage & """);"
strScript += "</script"
If (Not ClientScript.IsStartupScriptRegistered("clientScript")) Then
ClientScript.RegisterClientScriptBlock(Me.GetType(), "clientScript", strScript)
End If
•
•
Join Date: Nov 2008
Posts: 5
Reputation:
Solved Threads: 0
HI,
To display a message box in asp.net you must use javascript in your html view of your form.Code is as followes.
In head teg of HTML View of your Web Form write the following code
<head>
<Script language="JavaScript">
function showMsg()
{
alert("Your message Here");
}
</Script>
</head>
To Call this function write the following code in ur Page_Load event code in (C#)
UrControlid.Attribute.Add("OnClick","return showMsg();");
I hope It will work.
To display a message box in asp.net you must use javascript in your html view of your form.Code is as followes.
In head teg of HTML View of your Web Form write the following code
<head>
<Script language="JavaScript">
function showMsg()
{
alert("Your message Here");
}
</Script>
</head>
To Call this function write the following code in ur Page_Load event code in (C#)
UrControlid.Attribute.Add("OnClick","return showMsg();");
I hope It will work.
![]() |
Similar Threads
- Tutorial: Understanding ASP classes (ASP)
- Retrieve Information from Database & Display into ASP.NET Web Controls Textbox (ASP.NET)
- message box (ASP.NET)
- What is the equivalent code of MessageBox in ASP.Net? (ASP.NET)
- message box (ASP.NET)
- retrieving ids from dynamically created controls in asp.net (ASP)
- Populating & Retrieving Data in a listbox : ASP.NET (w/ VB.NET) (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: can anyone please help me!
- Next Thread: insert data Queries.
| Thread Tools | Search this Thread |
.net 2.0 3.5 ajax alltypeofvideos appliances asp asp.net beginner box browser businesslogiclayer button c# cac checkbox class commonfunctions compatible content contenttype control countryselector courier dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv gridview gudi iis javascript list listbox login menu microsoft mouse mssql nameisnotdeclared news novell numerical opera order panelmasterpagebuttoncontrols problem radio ratings redirect registration relationaldatabases reportemail schoolproject search security serializesmo.table sessionvariables silverlight smoobjects software sql sql-server sqlserver2005 ssl tracking treeview validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming webservice wizard xsl youareanotmemberofthedebuggerusers





