All,

I am attaching the following snapshot of the code I
wrote within the HTML and not on the VBIDE.

I am getting the following error on
HttpContext.Current.Session("DeptCode")

System.NullReferenceException: Object reference not
set to an instance of an object.

Why am I getting this error? I don't get this error
when I put this session variable on the VBIDE...it
executes fine. I cheked it by doing response.write.

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="SystemDetailList.aspx.vb"
Inherits="HIPPA.SystemDetailList"%>
<%@ Import namespace="System.Data" %>
<%@ Import namespace="System.Data.OleDb" %>

<HTML>
        <HEAD>
                <title>Updating Requests</title>
        </HEAD>
        <body>
                <form id="Form1" method="post" runat="server">
                        <P>&nbsp;
                        </P>
                        <P><asp:datagrid id="dgInflow" runat="server"
CellPadding="1" AutoGenerateColumns="False"
OnEditCommand="EditRecord"
                                        OnCancelCommand="CancelEdit"
OnUpdateCommand="Updaterecord" Font-Names="Arial"
Font-Size="XX-Small"
                                        Width="664px">
                                        <HeaderStyle BackColor="Tan"></HeaderStyle>
                                        <AlternatingItemStyle
BackColor="Khaki"></AlternatingItemStyle>
                                        <ItemStyle Font-Size="XX-Small"
Font-Names="Arial"></ItemStyle>
                                        <Columns>
                                                <asp:BoundColumn DataField="SystemID"
ReadOnly="True"></asp:BoundColumn>
                                                <asp:BoundColumn 
DataField="T1SystemName"
ReadOnly="True" HeaderText="System
Name"></asp:BoundColumn>
                                                <asp:BoundColumn DataField="T1Vendor"
ReadOnly="True" HeaderText="Vendor
Name"></asp:BoundColumn>
                                                <asp:BoundColumn DataField="T1Version"
ReadOnly="True"
HeaderText="Version"></asp:BoundColumn>
                                                <asp:BoundColumn DataField="T2Hardware"
ReadOnly="True"
HeaderText="Hardware"></asp:BoundColumn>
                                                <asp:BoundColumn DataField="T3OpSystem"
HeaderText="Operating System"></asp:BoundColumn>
                                                <asp:EditCommandColumn 
ButtonType="LinkButton"
UpdateText="Save" CancelText="Cancel"
EditText="Edit"></asp:EditCommandColumn>
                                        </Columns>
                                </asp:datagrid></P>
                </form>
                <script language="VB" runat="server">
  Public strSQLSelect As String = "SELECT * FROM
tbl_system WHERE deptcode=" &
HttpContext.Current.Session("DeptCode") & ""

</script>
        </body>
</HTML>



                
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to