need help read DataSet with DAL

Discussion in 'ASP .Net Web Services' started by Ungi, Sep 20, 2007.

  1. Ungi

    Ungi Guest

    Hi,
    I'm new for ASP.NET and for Using C#.
    I'm trying to create Web Project that have Log in form and return user ID
    ("UserID"), User TypeID ("fUserTypeID") ,User SecurityLevel
    ("UserSecurityLevel") ,User Fullname ("ShowName") from SQLdb, usind DAL.

    i DrugAndDrop ObjectDataSource named/ID ObjectDataSource1 and then connect
    the GridView in to it.
    The ObjectDataSource1 is working with DAL (running with SP) and get 2
    parameters (UserName, Password)
    and return UserID and UserFullName.

    the code:

    <%--Start GridView--%>
    <tr>
    <td align="center" colspan="2">
    <asp:GridView ID="GridView1" runat="server"
    AutoGenerateColumns="False" DataKeyNames="UserID"
    DataSourceID="ObjectDataSource1">
    <Columns>
    <asp:BoundField DataField="UserID" HeaderText="UserID"
    InsertVisible="False" ReadOnly="True"
    SortExpression="UserID" />
    <asp:BoundField DataField="fUserTypeID" HeaderText="fUserTypeID"
    ReadOnly="True"
    SortExpression="fUserTypeID" />
    <asp:BoundField DataField="UserSecurityLevel"
    HeaderText="UserSecurityLevel" ReadOnly="True"
    SortExpression="UserSecurityLevel" />
    <asp:BoundField DataField="ShowName" HeaderText="ShowName"
    ReadOnly="True" SortExpression="ShowName" />
    </Columns>
    </asp:GridView>

    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
    OldValuesParameterFormatString="original_{0}"
    SelectMethod="GetData"

    TypeName="Dal_Class_For_AspNet_Agent.dsNWTableAdapters.AspNet_Xnet_sp_Agent_LoginTableAdapter">
    <SelectParameters>
    <asp:ControlParameter ControlID="inputUserName" Name="UserName"
    PropertyName="Text"
    Type="String" />
    <asp:ControlParameter ControlID="inputPassword" Name="Password"
    PropertyName="Text"
    Type="String" />
    </SelectParameters>
    </asp:ObjectDataSource>
    </td>
    </tr>
    <%--End GridView--%>

    I manage to make it work and see the data in GrideView.
    But what i like to do, is to get the return data as Recordset / Parameters
    and put them into 2 separate SESSIONS, so i will be able to
    print out at the top frame of the page the UserFullName and keep in SESSION
    the UserID for later validation.

    Can You please advice with sample code ?
     
    Ungi, Sep 20, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gavin Joyce
    Replies:
    0
    Views:
    4,579
    Gavin Joyce
    Jul 5, 2003
  2. dbuchanan
    Replies:
    1
    Views:
    1,473
  3. Tony

    Where to place the DAL assembly

    Tony, Aug 22, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    337
  4. rakesh

    DAL

    rakesh, Aug 22, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    686
    Kevin Swarts
    Aug 22, 2003
  5. jobs
    Replies:
    0
    Views:
    2,029
Loading...

Share This Page