Loading
<script> <asp:Literal ID="ltlAlert" runat="server" EnableViewState="False"></asp:Literal> </script>
2). Add the following codein Code Behind
Partial Class _Default Inherits System.Web.UI.Page Protected WithEvents Literal As System.Web.UI.WebControls.Literal Private Sub Say(ByVal Message As String) ' Format string properly Message = Message.Replace("'", "\'") Message = Message.Replace(Convert.ToChar(10), "\n") Message = Message.Replace(Convert.ToChar(13), "") ' Display as JavaScript alert ltlAlert.Text = "alert('" & Message & "')" End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Say("asasas") End Sub End Class
About the author:
PlanetSourceCode.in is a place for all developer providing free source codes, articles, complete projects,complete application in PHP, C/C++, Javascript, Visual Basic, Cobol, Pascal, ASP/VBScript, AJAX, SQL, Perl, Python, Ruby, Mobile Development
Comments
make the youtube url a link
make the youtube url a link intsead
Pages
Add new comment