Datasource to use Querystring AND Form

Discussion in 'ASP .Net' started by Larry Bud, Jan 26, 2007.

  1. Larry Bud

    Larry Bud Guest

    I've got a page with a simple search form for a Part #. User enters a
    partial part #, click Submit, datagrid does it's thing and displays
    part #s that match the search. The datasource that is used uses a
    Parameter coming from the Form object.

    All is well and good.

    Have another page that lists a BOM (Bill of Materials) which obviously
    contains part #s, and I want to link from Page #2 back to the search
    page, passing it a part #, and having it do a lookup for that part, as
    if that part # was entered into the search form and the user pressed
    the Submit button.

    I'm stumped as how to "fool" .NET into thinking the user did this.
    Larry Bud, Jan 26, 2007
    #1
    1. Advertising

  2. Page 1: Part Search
    Page 2: Bill of materials (Multiple parts, with links to Page 1)

    Why aren't you simply passing the part # as a query string, then calling the
    functionality handled by the Submit button click during the Page_Load event?
    You don't need to force a submit.

    "Larry Bud" wrote:

    > I've got a page with a simple search form for a Part #. User enters a
    > partial part #, click Submit, datagrid does it's thing and displays
    > part #s that match the search. The datasource that is used uses a
    > Parameter coming from the Form object.
    >
    > All is well and good.
    >
    > Have another page that lists a BOM (Bill of Materials) which obviously
    > contains part #s, and I want to link from Page #2 back to the search
    > page, passing it a part #, and having it do a lookup for that part, as
    > if that part # was entered into the search form and the user pressed
    > the Submit button.
    >
    > I'm stumped as how to "fool" .NET into thinking the user did this.
    >
    >
    =?Utf-8?B?S2VpdGg=?=, Jan 26, 2007
    #2
    1. Advertising

  3. Larry Bud

    Larry Bud Guest

    On Jan 26, 4:12 pm, Keith <> wrote:
    > Page 1: Part Search
    > Page 2: Bill of materials (Multiple parts, with links to Page 1)
    >
    > Why aren't you simply passing the part # as a query string, then calling the
    > functionality handled by the Submit button click during the Page_Load event?
    > You don't need to force a submit.


    There are additional parameters, such as in a drop down, that can be
    selected in the Part Search page (they're optional). So when a user
    is in the BOM and selects a part #, it needs to do the Search function
    on the part search page since multiple rows can be returned.

    But I didn't even think of passing the form as a GET instead of a
    POST.
    Larry Bud, Jan 29, 2007
    #3
    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. George
    Replies:
    5
    Views:
    6,588
    George
    Apr 2, 2004
  2. Mehdi
    Replies:
    6
    Views:
    36,060
    sloan
    Apr 6, 2006
  3. John C. Bollinger

    Re: Servlets and form posts/querystring

    John C. Bollinger, Jun 27, 2003, in forum: Java
    Replies:
    4
    Views:
    6,737
    John C. Bollinger
    Jul 1, 2003
  4. Replies:
    3
    Views:
    7,477
  5. Adeel Ahmad
    Replies:
    1
    Views:
    327
    Anthony Jones
    Mar 7, 2006
Loading...

Share This Page