<div id="dUserSystems" runat="server" > <u>Systems user has access to</u><br /> <div id="dUserData"></div> <br /><br /> <div id="ddlSysData" runat="server" > <u>Add new system to users account</u><br /> <asp:DropDownList ID="sysDDL" runat="server"></asp:DropDownList> </div> <br /><br /> <input type="button" id="butAdd" value="Add" runat="server" style="font-family: Verdana,Tahoma,Arial; float: left;"/> <input type="button" onclick="butClose()" value="Close" /> </div>
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load 'Add session check here If Request.QueryString("userid") <> "" Then Dim dsResults As New DataSet Dim dt As DataTableReader dsResults = GetUserName.systemData(Request.QueryString("userid").ToString) dt = dsResults.CreateDataReader Dim dv As New HtmlGenericControl("div") dv.ID = "sysData" Dim tb As New Table Dim tr As New TableRow Dim tc As New TableCell Dim lb As New Label Dim iCount As Integer = 1 If dt.HasRows = True Then tr = New TableRow tr.CssClass = "tabHeader" tc = New TableCell tc.CssClass = "tabCell" lb = New Label lb.Text = "System Name" tc.Controls.Add(lb) tr.Controls.Add(tc) tb.Controls.Add(tr) tr.CssClass = "tabHeader" tc = New TableCell tc.CssClass = "tabCell" lb = New Label lb.Text = "Date Added" tc.Controls.Add(lb) tr.Controls.Add(tc) tb.Controls.Add(tr) tr.CssClass = "tabHeader" tc = New TableCell tc.CssClass = "tabCell" lb = New Label lb.Text = "Added By" tc.Controls.Add(lb) tr.Controls.Add(tc) tb.Controls.Add(tr) Do While dt.Read tr = New TableRow If iCount = 1 Then tr.CssClass = "rowStyle3" iCount = 0 Else tr.CssClass = "rowStyle4" iCount = 1 End If 'tr = New TableRow tc = New TableCell tc.CssClass = "rowCell2" lb = New Label lb.Text = dt.Item("description").ToString() tc.Controls.Add(lb) tr.Controls.Add(tc) tb.Controls.Add(tr) 'tr = New TableRow tc = New TableCell tc.CssClass = "rowCell2" lb = New Label lb.Text = dt.Item("date_added").ToString() tc.Controls.Add(lb) tr.Controls.Add(tc) tb.Controls.Add(tr) 'tr = New TableRow tc = New TableCell tc.CssClass = "rowCell2" lb = New Label lb.Text = dt.Item("added_by").ToString() tc.Controls.Add(lb) tr.Controls.Add(tc) tb.Controls.Add(tr) Loop dt.Close() dsResults.Dispose() dv.Controls.Add(tb) sysData.Controls.Add(dv) Else Response.Write("No Systems Located for User") End If End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)