Share Your Source Code or Article

Do you have source code, articles, tutorials, web links, and books to share? You can write your own content here. You can even have your own blog.

Submit now...

Database Programming Made Easy

This tutorial will teach you step by step on how to connect and manipulate database. If you'd like to suggest a tutorial please write a comment at the bottom of this article.

Read more...

Hire Us to Do Your Work

Do you want a customized system? Do you want to setup your own website to do business? Then we are here to help you in your programming needs.

Read more...

Search

Message box in vb.net
planetsourcecode's picture
Language: .NET
Category: Miscellaneous

You have to do two things for creatng a messagebox in vb.net
1) In design mode add the following codes after

  1. <script>
  2. <asp:Literal ID="ltlAlert" runat="server" EnableViewState="False"></asp:Literal>
  3. </script>

2). Add the following codein Code Behind

  1. Partial Class _Default
  2.  
  3. Inherits System.Web.UI.Page
  4. Protected WithEvents Literal As System.Web.UI.WebControls.Literal
  5. Private Sub Say(ByVal Message As String)
  6. ' Format string properly
  7. Message = Message.Replace("'", "\'")
  8. Message = Message.Replace(Convert.ToChar(10), "\n")
  9. Message = Message.Replace(Convert.ToChar(13), "")
  10. ' Display as JavaScript alert
  11. ltlAlert.Text = "alert('" & Message & "')"
  12. End Sub
  13.  
  14.  
  15. Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
  16. Say("asasas")
  17. End Sub
  18. 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

0
Your rating: None



Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <java>, <java5>, <javascript>, <mysql>, <php>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • You may use [inline:xx] tags to display uploaded files or images inline.
  • Links to specified hosts will have a rel="nofollow" added to them.

  • You may insert videos with [video:URL]

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.

Step by Step Java Tutorial

In this tutorial you will learn how to program with Java. It has a rich of information to be educated well with Java.

Read more...

Do You Have Question?

Do you have any question related to computer programming? Visit our forum and post new topic on the category you like. Be gentle when asking a question.

Ask now...

Point of Sale

Point of Sale is very useful especially for supermarkets or restaurants. I have included a barcode scanner in this program. Please check it out.

Read more...