Skip to Content
author's profile photo Former Member
Former Member

WebForm Datagrid binding

Hi Reiner,

As discussed in the last post, i managed to pass over tables from one page to another, however i am unable to code my application properly.

This is because of the object which i am passing to the second page, it has a routine in the first page in Page_Load which retrieves the session state from the 2nd page on the updated table. The problem is that if page loads up after SAPLogin.aspx and after exiting from the first page into the next, if i send out an the table in my button event handler, it will send as Nothing. I am trying to trap the Page_Load section with some kind of code that does not do a <b>Proxy.tblItems = CType(Session.Item("MYTABLE"), BAPIXXXTable)</b> on Page_Load until after the new item in the 2nd page has been added. i tried to read the properties of the table Proxy.tblitems, however it gives me an error, as usual no object instance ... blah blah blah

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Dec 22, 2004 at 01:50 PM

    Please note in your designer that the Session state is a global bag for everything in your app. You wouldn't store there something for a special page, but just globally.

    A good practice that all participating pages have a member variable of the common tables (e.g. order items), e.g. it#s called tblItems. An participating pages have common block like this in there Page_Load

    tblItems = CType(Session.Item("MYTABLE"), BAPIXXXTable)

    if tblItems = Nothing

    tblItems = New BAPIXXXTable()

    This ensures that all pages see the same table instance, but it's never uninitialized.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.