By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,290 Members | 1,263 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,290 IT Pros & Developers. It's quick & easy.

Message box at ASP.Net

P: n/a
Jul
Hi,

How create MsgBox or any analog of that function in ASP.Net?

Thanks
Nov 21 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Jul,

By instance,
\\\
Page.RegisterClientScriptBlock("clientScript", scriptString)
Dim str As String = "<script language " & _
"=javascript>alert('I hope this helps a little bit?');</script>"
Page.RegisterStartupScript("Startup", str)
///

I hope this helps?

Cor
Nov 21 '05 #2

P: n/a
Jul
Yes, it helps, but also couple questions:
1. Why I need to call RegisterClientScriptBlock?
2. Why after I press "Refresh (F5)" I get the message " The page cannot be
refreshed without resending the information..." . When I click "Retry" the
alert dialog appear again, but it has to appear only (in my case) when I
click Button on the form.

Thanks

"Cor Ligthert" <no************@planet.nl> wrote in message
news:On**************@tk2msftngp13.phx.gbl...
Jul,

By instance,
\\\
Page.RegisterClientScriptBlock("clientScript", scriptString)
Dim str As String = "<script language " & _
"=javascript>alert('I hope this helps a little bit?');</script>"
Page.RegisterStartupScript("Startup", str)
///

I hope this helps?

Cor

Nov 21 '05 #3

P: n/a
Jul,
but it has to appear only (in my case) when I click Button on the form.


Than you have to ask that. You can place in the load event of the page.
Me.Button1.Attributes("onClick") = "alert('I hope this helps a little
bit?');"

I hope this helps?

Cor



By instance,
\\\
Page.RegisterClientScriptBlock("clientScript", scriptString)
Dim str As String = "<script language " & _
"=javascript>alert('I hope this helps a little bit?');</script>"
Page.RegisterStartupScript("Startup", str)
///

I hope this helps?

Cor


Nov 21 '05 #4

P: n/a
Jul
But can I include script/code to the Private Sub Button1_Click?
or always has to be in Load Event of the page?
and what cases I need to use RegisterClientScriptBlock or
RegisterStartupScript
"Cor Ligthert" <no************@planet.nl> wrote in message
news:eD*************@tk2msftngp13.phx.gbl...
Jul,
but it has to appear only (in my case) when I click Button on the form.


Than you have to ask that. You can place in the load event of the page.
Me.Button1.Attributes("onClick") = "alert('I hope this helps a little
bit?');"

I hope this helps?

Cor



By instance,
\\\
Page.RegisterClientScriptBlock("clientScript", scriptString)
Dim str As String = "<script language " & _
"=javascript>alert('I hope this helps a little bit?');</script>" Page.RegisterStartupScript("Startup", str)
///

I hope this helps?

Cor



Nov 21 '05 #5

P: n/a
Jul,

Register startup is "onload"
The attribute you can use where you want, don't forget that every sent the
information is refreshed.

I hope this helps?

Cor
Nov 21 '05 #6

P: n/a
Jul
Thanks for your explanations.
I will try but I am not sure that understand everything.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:u7*************@TK2MSFTNGP11.phx.gbl...
Jul,

Register startup is "onload"
The attribute you can use where you want, don't forget that every sent the
information is refreshed.

I hope this helps?

Cor

Nov 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.