ASP.NET(vb.net) & Call JavaScript Function - Learn how to use ASP.NET script call the javascript script client function.
ShotDev Focus:
- ASP.NET(vb.net) & Call JavaScript Function
Example
CallJavaScript.aspx
<%@ Page Language="VB" %> <script runat="server"> Sub Page_Load() Me.hplLink.NavigateUrl = "#" Me.hplLink.Attributes.Add("OnClick","JavaScript:fncJavaScript();") Me.lblLabel.Attributes.Add("OnClick","JavaScript:fncJavaScript();") Me.lblLabel.Style.Add("cursor", "hand") End Sub </script> <html> <head> <title>ShotDev.Com Tutorial</title> <script language="JavaScript"> function fncJavaScript() { alert('Welcome To www.ShotDev.Com'); } </script> </head> <body> <form runat="server"> <asp:HyperLink ID="hplLink" runat="server">Click Here</asp:HyperLink></div><br /> <asp:Label ID="lblLabel" runat="server" Text="Label">Link Here</asp:Label> </form> </body> </html>
Screenshot
2twenty-fourth…
…