|
|||||||
| .NET Discussion and technical support for, building, using and deploying .NET sites. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Calling javascript function from code behind
Hi,
I have a web page created in asp.net app (VB). I want to show a alert box after doing some validations. And I also want to do some more codebehing process after . Is it possible to call a Javascript function through Codebehind. Thanks, Sangram |
|
#2
|
|||
|
|||
|
use the Page.RegisterStartupScript method
Declare a string, build up a valid javascript statement, and then pass it as parameter to this method. sht like this (typing from top of my head, so....) Code:
Dim x as string = "<script language='JavaScript'> alert('visit www.niconel.com') </script>"
Me.RegisterStartupScript("Startup", scriptString)
please research and test it...i did not use vb in ages
__________________
niconel.com |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|