943,813 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 2494
  • ASP.NET RSS
Nov 14th, 2008
0

how to display the message box in asp.net

Expand Post »
hai to all


how to display the message box in asp .net
why means while i am creating database i want to dispay a message like..


"connection is created" like this

how it is display

please give me the answer
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
krany18 is offline Offline
19 posts
since Nov 2008
Nov 15th, 2008
0

Re: how to display the message box in asp.net

Try to following code and it's insert after your connection string code.

Quote ...
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
Reputation Points: 10
Solved Threads: 9
Junior Poster
sierrainfo is offline Offline
144 posts
since May 2008
Nov 18th, 2008
0

Re: how to display the message box in asp.net

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jazz.learner is offline Offline
5 posts
since Nov 2008
Nov 18th, 2008
0

Re: how to display the message box in asp.net

or u can assign string to label control and show the label control at top of ur web form.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
priyankaa is offline Offline
4 posts
since Apr 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: can anyone please help me!
Next Thread in ASP.NET Forum Timeline: insert data Queries.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC