| | |
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 activexcontrol advice ajax alltypeofvideos application asp asp.net bc30451 bottomasp.net box browser button c# c#gridviewcolumn checkbox click commonfunctions confirmationcodegeneration css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dynamically edit expose feedback fileuploader fill flash form formatdecimal forms formview grid gridview gudi homeedition hosting iframe iis javascript jquery listbox login microsoft mono mouse mssql multistepregistration news numerical objects opera panelmasterpagebuttoncontrols parent radio redirect registration relationaldatabases reportemail rotatepage save schoolproject search security select silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking unauthorized validation vb.net video videos view virtualdirectory vista visualstudio web webapplications webdevelopemnt webprogramming webservice xml xsl youareanotmemberofthedebuggerusers





