<%@ Page Language="VB" Debug="true" MasterPageFile="~/Nested Master Pages/user.master" Title="Untitled Page" %>
<%@ Register Assembly="RbmControls" Namespace="RbmControls" TagPrefix="Rbm" %>
<%@ Import Namespace="System.Web.Security" %>
<%@ Import Namespace="System.IO" %>
<script runat="server">
Public Sub Page_Load()
currentUser = Membership.GetUser()
SqlDataSource1.SelectParameters("UserId").DefaultValue = currentUser.ProviderUserKey.ToString()
SqlDataSource1.DataBind()
End Sub
Protected Sub btnCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs)
'If Cancel button is clicked, send user to Default
Response.Redirect("~/Annonymous/index.aspx")
End Sub
Dim currentUser As MembershipUser
'SelectCommand="SELECT ID, UserId, Year, Make, Model, Type, MilesHours, VinSerial, Description, Location, Price, FROM Equipment, CustomerImages Where UserId = @UserId"
</script>
<%-- Add content controls here --%>
<asp:Content ID="Content2" runat="server" contentplaceholderid="ContentPlaceHolder4">
Welcome: <b><%=currentUser.UserName%></b>.<br />
UserId: <b><%=currentUser.ProviderUserKey%></b>.
<div>
<asp:GridView ID="GridView2" AllowSorting="true" AllowPaging="true" Runat="server" Font-Size="Small"
DataSourceID="SqlDataSource1" AutoGenerateEditButton="true" AutoGenerateDeleteButton="True" DataKeyNames="Id"
AutoGenerateColumns="False">
<Columns>
<asp:BoundField HeaderText=" ID " DataField="ID" SortExpression="ID" ReadOnly="true" ControlStyle-Width="20" />
<asp:BoundField HeaderText=" Year " DataField="Year" SortExpression="Year" ItemStyle-HorizontalAlign="Center" ControlStyle-Width="30" />
<asp:BoundField HeaderText=" Make " DataField="Make" SortExpression="Make" ControlStyle-Width="150" />
<asp:BoundField HeaderText=" Model " DataField="Model" SortExpression="Model" ControlStyle-Width="80" />
<asp:BoundField HeaderText=" Type " DataField="Type" SortExpression="Type" ControlStyle-Width="150" />
<asp:BoundField HeaderText=" MilesHours " DataField="MilesHours" SortExpression="MilesHours" ItemStyle-HorizontalAlign="Right" ControlStyle-Width="60" />
<asp:BoundField HeaderText=" VinSerial " DataField="VinSerial" SortExpression="VinSerial" ItemStyle-HorizontalAlign="Center" ControlStyle-Width="60" />
<asp:BoundField HeaderText=" Description " DataField="Description" SortExpression="Description" ControlStyle-Width="200" />
<asp:BoundField HeaderText=" Location " DataField="Location" SortExpression="Location" ControlStyle-Width="200"/>
<asp:BoundField HeaderText=" Price " DataField="Price" SortExpression="Price" DataFormatString="${0:C}" ItemStyle-HorizontalAlign="Right" ControlStyle-Width="50"/>
Can I put a link querystring to pass this view of the grid's ID to another page.
</Columns>
</asp:GridView>
</asp:Content>
|