Sites Services
Web
Forms
Web
Pages
Single Page Apps
MVCWeb Api
SignalR
ASP.NET
[Site Entry Point: Frames][SignalR:MoveSquare]
[Site Entry Point: MVC]    [SignalR: KnockOut Form]
[Site Entry Point: Index]  [MVC: Standard Razor]
[Site Entry Point: Page]
Montego Home Montego Home
A Table with three columns with vertical-align: top, middle, bottom
/* File:Global.asax.cs */
public class MvcApplication : System.Web.HttpApplication
{
    protected void Session_Start(object sender, EventArgs e)
    {   
        Session["CartItemNumArray"] = new ArrayList();
        Session["salestaxrate"]     = 0.2;
    }
}
    <div>
        Today is <%=DateTime.Now.ToString("dd-MMM-yyyy")%>
        <%=DateTime.Now.AddDays(2).ToString("dd-MMM-yyyy")%>
    </div>

    <!-- Session Variables must be cast to their type -->
    
    <% double salestax = (double)Session["salestaxrate"]; %>
    <% 
		ArrayList stockPicks = (ArrayList)Session["CartItemNumArray"];
		stockPicks.Add("Dog");
		stockPicks.Add("Cat");
		stockPicks.Add("Goldfish");
		int k =  stockPicks.Count; 
    %>
    Value of Session Variable SalesTaxRate is: <%=salestax%><br/>
    Size Session ArrayList is: <%=k%> 

Today is 30-Dec-2024   01-Jan-2025
Value of Session Variable SalesTaxRate is: 0.2
Size Session ArrayList is: 3
Watch the count of the ArrayList when you press Refresh,
this is an example of in ASP.NET, by default all the pages post to themselves.

The syntax for producing a grid of a Data Table is as follows.
    <form id="form1" runat="server">    
    <div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:montegodataContext %>" 
        SelectCommand="SELECT [TRADE], [TODAY], [CLASS], [RULE], [CATEGORY], [LEGEND], [AMOUNT] FROM [FUNDING]">
    </asp:SqlDataSource>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="TRADE"       HeaderText="Trade"      SortExpression="TRADE"      />
            <asp:BoundField DataField="TODAY"       HeaderText="TODAY"      SortExpression="TODAY"      />
            <asp:BoundField DataField="CLASS"       HeaderText="CLASS"      SortExpression="CLASS"      />
            <asp:BoundField DataField="RULE"        HeaderText="RULE"       SortExpression="RULE"       />
            <asp:BoundField DataField="CATEGORY"    HeaderText="CATEGORY"   SortExpression="CATEGORY"   />
            <asp:BoundField DataField="LEGEND"      HeaderText="LEGEND"     SortExpression="LEGEND"     />
            <asp:BoundField DataField="AMOUNT"      HeaderText="Amount"     SortExpression="AMOUNT"     />
        </Columns>
    </asp:GridView>
    </div>    
    </form>
IdKeyNameFlagAmountNumberBirthday
4fred heree1.001132411/10/1989 12:00:00 AM
54526Q62.0031465/28/1932 12:00:00 AM
76611s5.00126/11/1973 12:00:00 AM
9minusg12.1066668/13/1967 12:00:00 AM
10nng123.456543219/16/1968 12:00:00 AM
11ggf0.12123458/20/1965 12:00:00 AM
12minusx5.0054/20/1958 12:00:00 AM
13DarrenM12.001212/20/1960 12:00:00 AM
14hjkf4.0059/18/2015 12:00:00 AM
15retM4.0049/2/2015 12:00:00 AM
16ertt5.00569/20/2015 12:00:00 AM
17af1.0021/4/2016 12:00:00 AM
183190w5.00432/13/2016 12:00:00 AM
19abcf123.00122/2/2016 12:00:00 AM
20Peterf655.00655543/7/2016 12:00:00 AM
21try65yrtyi65.001234453/8/2016 12:00:00 AM
223258h3.0012343/14/2016 12:00:00 AM
24ghghghh5456.00554510/10/2017 12:00:00 AM
25RogerX123.34123412/31/2017 12:00:00 AM
26Judeg0.0004/20/2019 12:00:00 AM
27  0.00010/11/2022 12:00:00 AM

Note that <asp:HyperLink> cannot be used with PostBackUrl="..." but must use NavigateUrl="..."
The buttons <asp:Button> <asp:LinkButton> <asp:ImageButton> can use both
(netPlanets) PostBackUrl asp:HyperLink
Page Navigation Sign On or Links Asp.Net Nature of the Form Details on the Planets of the Solar System