how to show msgbox

sethumail2000

New member
Joined
Jun 15, 2006
Messages
3
Programming Experience
1-3
Hi,

I'm new in asp.net2.0. I want to show msgbox when i click the button. Pls give me some example


Advance thanks for all
 
VB.NET:
<script language="vb" runat="server">
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        cmdMsg.Attributes.Add("onclick", "msgbox('Hi');")    
    end sub
</script>

<script language=javascript>
    function msgbox(str)
    {
        alert(str);
    }
</script>

<form runat=server >
<asp:button ID=cmdMsg Runat =server />
</form>
 
Thanks,

So we cannot use messagebox class directly in webforms.is't?

Could you explain the bold one?

Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
 
Back
Top