To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
Part 10 of the Visual Basic .NET 2010 Express Tutorial Complete!
How to Use the Visual Studio Code Analysis Tool FxCop
Article :: Interview with Andrei Alexandrescu (Part 3 of 3)
Introducing Visual Studio LightSwitch
Visual Studio LightSwitch Beta 1 is Available



Go Back   VBForums > .NET > ASP.NET

Reply Post New Thread
 
Thread Tools Display Modes
Old Dec 29th, 2006, 09:47 AM   #1
lee2006
Member
 
Join Date: Dec 06
Posts: 40
lee2006 is an unknown quantity at this point (<10)
Resolved [RESOLVED] Header/Footer Templates

Hi there does nayone know how to add a footer to a mobile form. I need a back button to appear on all pages created by a lists pagnateion(pager). I need a button to appear on all paged pages allowing to go back to the first page.
Anyone know hoe to do this I was told a footer template for the form would do this.

Hope somone can help

lee
lee2006 is offline   Reply With Quote
Old Dec 29th, 2006, 01:33 PM   #2
wild_bill
Hick
 
wild_bill's Avatar
 
Join Date: Mar 05
Location: US of A
Posts: 2,325
wild_bill is a jewel in the rough (300+)wild_bill is a jewel in the rough (300+)wild_bill is a jewel in the rough (300+)wild_bill is a jewel in the rough (300+)
Re: Header/Footer Templates

Here's a simple example:
The data grid
Code:
       <asp:DataGrid ID="DataGrid1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            PageSize="5" ShowFooter="True">
            <Columns>
                <asp:TemplateColumn HeaderText="My Column">
                <ItemTemplate>
                    <%#Container.DataItem("myColumn")%>
                </ItemTemplate>
                <FooterTemplate>
                    <asp:Button ID="btnPage1" runat=server OnClick="btnPage1_Click" Text="Page 1" />
                </FooterTemplate>
                </asp:TemplateColumn>
            </Columns>
        </asp:DataGrid>
The code behind
VB Code:
  1. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  2.         If Not Page.IsPostBack Then
  3.             BindData()
  4.         End If
  5.     End Sub
  6.     Protected Sub BindData()
  7.         Dim dt As New Data.DataTable
  8.         dt.Columns.Add("myColumn")
  9.         dt.Rows.Add("1")
  10.         dt.Rows.Add("2")
  11.         dt.Rows.Add("3")
  12.         dt.Rows.Add("4")
  13.         dt.Rows.Add("5")
  14.         dt.Rows.Add("6")
  15.         dt.Rows.Add("7")
  16.         dt.Rows.Add("8")
  17.         dt.Rows.Add("9")
  18.         dt.Rows.Add("10")
  19.         dt.Rows.Add("11")
  20.         dt.Rows.Add("12")
  21.         dt.Rows.Add("13")
  22.         dt.Rows.Add("14")
  23.         dt.Rows.Add("15")
  24.         DataGrid1.DataSource = dt
  25.         DataGrid1.DataBind()
  26.     End Sub
  27.     Protected Sub DataGrid1_PageIndexChanged _
  28.     (ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) _
  29.     Handles DataGrid1.PageIndexChanged
  30.         DataGrid1.CurrentPageIndex = e.NewPageIndex
  31.         BindData()
  32.     End Sub
  33.     Protected Sub btnPage1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
  34.         DataGrid1.CurrentPageIndex = 0
  35.         BindData()
  36.     End Sub
wild_bill is offline   Reply With Quote
Reply

Go Back   VBForums > .NET > ASP.NET


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:17 AM.





Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.