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...
 
Back
Top