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

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="UpdateProgress.aspx.vb" Inherits="UpdateProgress" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<br />
<asp:Button ID="Button1" runat="server" Text="Button" />
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" runat="server">
<ProgressTemplate>
<asp:Image ID="Image1" ImageUrl="loading.gif" runat="server" />
</ProgressTemplate>
</asp:UpdateProgress>
</div>
</form>
</body>
</html>

UpdateProgress.aspx.vb


Partial Class UpdateProgress
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
UpdateProgress1.DisplayAfter = 100
UpdateProgress1.Visible = True
UpdateProgress1.DynamicLayout = True
End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
System.Threading.Thread.Sleep(1000)
Label1.Text = "Welcome To ShotDev.Com : " & DateTime.Now.ToLongTimeString()
End Sub

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.