VB SCript in .NET?

  • Thread starter Thread starter StudentMCDBA
  • Start date Start date
S

StudentMCDBA

I'm trying to display a message box when user click a button. In VBScript I
can to do it with msgbox() function , but in ASP.NET how I do this?

Thanks,

WBG
 
Hi, You cannot, because ASP.NET is run on the server, not on the client. You
must execute client code, in VBScript or JavaScript to do this.

'===
<SCRIPT><!--
alert('A Message!');
--></SCRIPT>
'===

--
HTH,
-- Tom Spink, Über Geek

Woe be the day VBC.EXE says, "OrElse what?"

Please respond to the newsgroup,
so all can benefit
 
Hi

(I changed it here so watch little errors)

MyButton.Attributes("onclick") = "javascript:alert('Hello! does this
help!!');"

Cor
 
Herfried,

Hey... no one was asking on how obsolete the tag was... =)

Also, its still pretty heavily used... however, I would recommend adding the
language attribute to it...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top