web 2.0

ASP.NET(vb.net) & UpdateProgress

ASP.NET(vb.net) & UpdateProgress - Provides visual feedback in the browser when the contents of one or more UpdatePanel controls are updated.

ShotDev Focus:
- ASP.NET(vb.net) & UpdateProgress

ASP.NET(vb.net) & UpdateProgress

Example

UpdateProgress.aspx

  1. <%@ Page Language="VB" AutoEventWireup="false" CodeFile="UpdateProgress.aspx.vb" Inherits="UpdateProgress" %>  
  2.   
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  4.   
  5. <html xmlns="http://www.w3.org/1999/xhtml">  
  6. <head runat="server">  
  7. <title>ShotDev.Com Tutorial</title>  
  8. </head>  
  9. <body>  
  10. <form id="form1" runat="server">  
  11. <div>  
  12. <asp:ScriptManager ID="ScriptManager1" runat="server" />  
  13. <asp:UpdatePanel ID="UpdatePanel1" runat="server">  
  14. <ContentTemplate>  
  15. <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>  
  16. <br />  
  17. <asp:Button ID="Button1" runat="server" Text="Button" />  
  18. </ContentTemplate>  
  19. </asp:UpdatePanel>  
  20. <asp:UpdateProgress ID="UpdateProgress1" runat="server">  
  21. <ProgressTemplate>  
  22. <asp:Image ID="Image1" ImageUrl="loading.gif" runat="server" />  
  23. </ProgressTemplate>  
  24. </asp:UpdateProgress>  
  25. </div>  
  26. </form>  
  27. </body>  
  28. </html>  

UpdateProgress.aspx.vb

  1. Partial Class UpdateProgress  
  2. Inherits System.Web.UI.Page  
  3.   
  4. Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load  
  5. UpdateProgress1.DisplayAfter = 100  
  6. UpdateProgress1.Visible = True  
  7. UpdateProgress1.DynamicLayout = True  
  8. End Sub  
  9.   
  10. Protected Sub Button1_Click(ByVal sender As ObjectByVal e As System.EventArgs) Handles Button1.Click  
  11. System.Threading.Thread.Sleep(1000)  
  12. Label1.Text = "Welcome To ShotDev.Com : " & DateTime.Now.ToLongTimeString()  
  13. End Sub  
  14.   
  15. End Class  

Screenshot

ASP.NET(vb.net) & UpdateProgress
.
.
.
Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

One Response to “ASP.NET(vb.net) & UpdateProgress”

  1. 1webster…

Leave a Reply

You must be logged in to post a comment.