QueryString Parameter

Discussion in 'ASP General' started by rn5a@rediffmail.com, May 9, 2007.

  1. Guest

    A MS-Access database table has 2 columns - UserID (unique) of number
    data type & UserName (text) along with some other columns.

    When users come to a particular page, say, AllUsers.asp, all the
    UserNames are displayed to him as hyperlinks. Based on the UserName
    clicked by a user, the next page (to which the user will be taken to
    when he clicks any of the UserNames) will display more information
    about that particular UserName (which the user had clicked).Assume
    that the page where more info is displayed is named UserInfo.asp.
    (Note that the info will also be retrieved from the DB table).
    UserInfo.asp will also display the UserName the user had just clciked
    in AllUsers.asp.

    Now for UserInfo.asp to retrieve data about the UserName the user has
    just clicked, I can make the links in AllUsers.asp pass the UserID as
    well as the UserName as a querystring value. Now whcih one will be
    more efficient - sending the UserID as the querystrinng value or
    sending the UserName as the querystring value?
    , May 9, 2007
    #1
    1. Advertising

  2. Guest

    On May 9, 6:20 am, wrote:
    > A MS-Access database table has 2 columns - UserID (unique) of number
    > data type & UserName (text) along with some other columns.
    >
    > When users come to a particular page, say, AllUsers.asp, all the
    > UserNames are displayed to him as hyperlinks. Based on the UserName
    > clicked by a user, the next page (to which the user will be taken to
    > when he clicks any of the UserNames) will display more information
    > about that particular UserName (which the user had clicked).Assume
    > that the page where more info is displayed is named UserInfo.asp.
    > (Note that the info will also be retrieved from the DB table).
    > UserInfo.asp will also display the UserName the user had just clciked
    > in AllUsers.asp.
    >
    > Now for UserInfo.asp to retrieve data about the UserName the user has
    > just clicked, I can make the links in AllUsers.asp pass the UserID as
    > well as the UserName as a querystring value. Now whcih one will be
    > more efficient - sending the UserID as the querystrinng value or
    > sending the UserName as the querystring value?


    ADDENDUM:
    ------------------

    Sorry made some changes to the app. Here's the revised post:

    When a user clicks a UserName in AllUsers.asp, he is first taken to an
    ASP page named Page1.asp (& not UserInfo.asp). Page1.asp also has
    links clicking which takes the user to UserInfo.asp which displays all
    the UserName info.

    Now Page1.asp displays a calendar & should also display the UserName
    just clicked. As such, Page1.asp doesn't interact with the MS-Access
    DB table. If I pass the UserID as the querystring value from
    AllUsers.asp to Page1.asp, then that means I have to get the UserName
    from the DB table since I am only passing the UserID as the
    querystring value & not the UserName. On the other hand, if I pass
    UserName as the querystring value from AllUsers.asp to Page1.asp, then
    there won't be any need for Page1.asp to interact with the DB table.

    So passing UserID as the querystring value which involves database
    communication is recommended or passing UserName as the querystring
    value which doesn't involve any database communication is recommended?
    , May 9, 2007
    #2
    1. Advertising

  3. Mike Brind Guest

    <> wrote in message
    news:...
    > On May 9, 6:20 am, wrote:
    >> A MS-Access database table has 2 columns - UserID (unique) of number
    >> data type & UserName (text) along with some other columns.
    >>
    >> When users come to a particular page, say, AllUsers.asp, all the
    >> UserNames are displayed to him as hyperlinks. Based on the UserName
    >> clicked by a user, the next page (to which the user will be taken to
    >> when he clicks any of the UserNames) will display more information
    >> about that particular UserName (which the user had clicked).Assume
    >> that the page where more info is displayed is named UserInfo.asp.
    >> (Note that the info will also be retrieved from the DB table).
    >> UserInfo.asp will also display the UserName the user had just clciked
    >> in AllUsers.asp.
    >>
    >> Now for UserInfo.asp to retrieve data about the UserName the user has
    >> just clicked, I can make the links in AllUsers.asp pass the UserID as
    >> well as the UserName as a querystring value. Now whcih one will be
    >> more efficient - sending the UserID as the querystrinng value or
    >> sending the UserName as the querystring value?

    >
    > ADDENDUM:
    > ------------------
    >
    > Sorry made some changes to the app. Here's the revised post:
    >
    > When a user clicks a UserName in AllUsers.asp, he is first taken to an
    > ASP page named Page1.asp (& not UserInfo.asp). Page1.asp also has
    > links clicking which takes the user to UserInfo.asp which displays all
    > the UserName info.
    >
    > Now Page1.asp displays a calendar & should also display the UserName
    > just clicked. As such, Page1.asp doesn't interact with the MS-Access
    > DB table. If I pass the UserID as the querystring value from
    > AllUsers.asp to Page1.asp, then that means I have to get the UserName
    > from the DB table since I am only passing the UserID as the
    > querystring value & not the UserName. On the other hand, if I pass
    > UserName as the querystring value from AllUsers.asp to Page1.asp, then
    > there won't be any need for Page1.asp to interact with the DB table.
    >
    > So passing UserID as the querystring value which involves database
    > communication is recommended or passing UserName as the querystring
    > value which doesn't involve any database communication is recommended?
    >


    You're just thinking out loud, aren't you?

    --
    Mike Brind
    Mike Brind, May 9, 2007
    #3
  4. Guest

    On May 9, 12:20 pm, "Mike Brind" <> wrote:
    > <> wrote in message
    >
    > news:...
    >
    >
    >
    >
    >
    > > On May 9, 6:20 am, wrote:
    > >> A MS-Access database table has 2 columns - UserID (unique) of number
    > >> data type & UserName (text) along with some other columns.

    >
    > >> When users come to a particular page, say, AllUsers.asp, all the
    > >> UserNames are displayed to him as hyperlinks. Based on the UserName
    > >> clicked by a user, the next page (to which the user will be taken to
    > >> when he clicks any of the UserNames) will display more information
    > >> about that particular UserName (which the user had clicked).Assume
    > >> that the page where more info is displayed is named UserInfo.asp.
    > >> (Note that the info will also be retrieved from the DB table).
    > >> UserInfo.asp will also display the UserName the user had just clciked
    > >> in AllUsers.asp.

    >
    > >> Now for UserInfo.asp to retrieve data about the UserName the user has
    > >> just clicked, I can make the links in AllUsers.asp pass the UserID as
    > >> well as the UserName as a querystring value. Now whcih one will be
    > >> more efficient - sending the UserID as the querystrinng value or
    > >> sending the UserName as the querystring value?

    >
    > > ADDENDUM:
    > > ------------------

    >
    > > Sorry made some changes to the app. Here's the revised post:

    >
    > > When a user clicks a UserName in AllUsers.asp, he is first taken to an
    > > ASP page named Page1.asp (& not UserInfo.asp). Page1.asp also has
    > > links clicking which takes the user to UserInfo.asp which displays all
    > > the UserName info.

    >
    > > Now Page1.asp displays a calendar & should also display the UserName
    > > just clicked. As such, Page1.asp doesn't interact with the MS-Access
    > > DB table. If I pass the UserID as the querystring value from
    > > AllUsers.asp to Page1.asp, then that means I have to get the UserName
    > > from the DB table since I am only passing the UserID as the
    > > querystring value & not the UserName. On the other hand, if I pass
    > > UserName as the querystring value from AllUsers.asp to Page1.asp, then
    > > there won't be any need for Page1.asp to interact with the DB table.

    >
    > > So passing UserID as the querystring value which involves database
    > > communication is recommended or passing UserName as the querystring
    > > value which doesn't involve any database communication is recommended?

    >
    > You're just thinking out loud, aren't you?
    >
    > --
    > Mike Brind- Hide quoted text -
    >
    > - Show quoted text -


    Sorry, Mike, I couldn't exactly get you....
    , May 9, 2007
    #4
  5. Mike Brind Guest

    <> wrote in message
    news:...
    > On May 9, 12:20 pm, "Mike Brind" <> wrote:
    >> <> wrote in message
    >>
    >> news:...
    >>
    >>
    >>
    >>
    >>
    >> > On May 9, 6:20 am, wrote:
    >> >> A MS-Access database table has 2 columns - UserID (unique) of number
    >> >> data type & UserName (text) along with some other columns.

    >>
    >> >> When users come to a particular page, say, AllUsers.asp, all the
    >> >> UserNames are displayed to him as hyperlinks. Based on the UserName
    >> >> clicked by a user, the next page (to which the user will be taken to
    >> >> when he clicks any of the UserNames) will display more information
    >> >> about that particular UserName (which the user had clicked).Assume
    >> >> that the page where more info is displayed is named UserInfo.asp.
    >> >> (Note that the info will also be retrieved from the DB table).
    >> >> UserInfo.asp will also display the UserName the user had just clciked
    >> >> in AllUsers.asp.

    >>
    >> >> Now for UserInfo.asp to retrieve data about the UserName the user has
    >> >> just clicked, I can make the links in AllUsers.asp pass the UserID as
    >> >> well as the UserName as a querystring value. Now whcih one will be
    >> >> more efficient - sending the UserID as the querystrinng value or
    >> >> sending the UserName as the querystring value?

    >>
    >> > ADDENDUM:
    >> > ------------------

    >>
    >> > Sorry made some changes to the app. Here's the revised post:

    >>
    >> > When a user clicks a UserName in AllUsers.asp, he is first taken to an
    >> > ASP page named Page1.asp (& not UserInfo.asp). Page1.asp also has
    >> > links clicking which takes the user to UserInfo.asp which displays all
    >> > the UserName info.

    >>
    >> > Now Page1.asp displays a calendar & should also display the UserName
    >> > just clicked. As such, Page1.asp doesn't interact with the MS-Access
    >> > DB table. If I pass the UserID as the querystring value from
    >> > AllUsers.asp to Page1.asp, then that means I have to get the UserName
    >> > from the DB table since I am only passing the UserID as the
    >> > querystring value & not the UserName. On the other hand, if I pass
    >> > UserName as the querystring value from AllUsers.asp to Page1.asp, then
    >> > there won't be any need for Page1.asp to interact with the DB table.

    >>
    >> > So passing UserID as the querystring value which involves database
    >> > communication is recommended or passing UserName as the querystring
    >> > value which doesn't involve any database communication is recommended?

    >>
    >> You're just thinking out loud, aren't you?
    >>
    >> --
    >> Mike Brind- Hide quoted text -
    >>
    >> - Show quoted text -

    >
    > Sorry, Mike, I couldn't exactly get you....
    >


    Well, calls to databases are expensive, and a good way to hamper the
    scalability of a site. So the rule of thumb is only make calls when
    absolutely necessary, and make them as short and sweet as possible. If you
    already have a value on page1, and passing that value to page2 using the
    querystring makes it available to that page thus negating an expensive
    additional and unnecessary call to the database, I would have thought the
    answer was self-evident.

    Your post reads like someone mentally weighing up 2 options out loud, only
    to arrive at the correct answer themselves, and therefore not requiring an
    answer from anyone else. Hence my equally rhetorical response :)

    --
    Mike Brind
    Mike Brind, May 9, 2007
    #5
  6. Guest

    On May 10, 1:30 am, "Mike Brind" <> wrote:
    > <> wrote in message
    >
    > news:...
    >
    >
    >
    >
    >
    > > On May 9, 12:20 pm, "Mike Brind" <> wrote:
    > >> <> wrote in message

    >
    > >>news:...

    >
    > >> > On May 9, 6:20 am, wrote:
    > >> >> A MS-Access database table has 2 columns - UserID (unique) of number
    > >> >> data type & UserName (text) along with some other columns.

    >
    > >> >> When users come to a particular page, say, AllUsers.asp, all the
    > >> >> UserNames are displayed to him as hyperlinks. Based on the UserName
    > >> >> clicked by a user, the next page (to which the user will be taken to
    > >> >> when he clicks any of the UserNames) will display more information
    > >> >> about that particular UserName (which the user had clicked).Assume
    > >> >> that the page where more info is displayed is named UserInfo.asp.
    > >> >> (Note that the info will also be retrieved from the DB table).
    > >> >> UserInfo.asp will also display the UserName the user had just clciked
    > >> >> in AllUsers.asp.

    >
    > >> >> Now for UserInfo.asp to retrieve data about the UserName the user has
    > >> >> just clicked, I can make the links in AllUsers.asp pass the UserID as
    > >> >> well as the UserName as a querystring value. Now whcih one will be
    > >> >> more efficient - sending the UserID as the querystrinng value or
    > >> >> sending the UserName as the querystring value?

    >
    > >> > ADDENDUM:
    > >> > ------------------

    >
    > >> > Sorry made some changes to the app. Here's the revised post:

    >
    > >> > When a user clicks a UserName in AllUsers.asp, he is first taken to an
    > >> > ASP page named Page1.asp (& not UserInfo.asp). Page1.asp also has
    > >> > links clicking which takes the user to UserInfo.asp which displays all
    > >> > the UserName info.

    >
    > >> > Now Page1.asp displays a calendar & should also display the UserName
    > >> > just clicked. As such, Page1.asp doesn't interact with the MS-Access
    > >> > DB table. If I pass the UserID as the querystring value from
    > >> > AllUsers.asp to Page1.asp, then that means I have to get the UserName
    > >> > from the DB table since I am only passing the UserID as the
    > >> > querystring value & not the UserName. On the other hand, if I pass
    > >> > UserName as the querystring value from AllUsers.asp to Page1.asp, then
    > >> > there won't be any need for Page1.asp to interact with the DB table.

    >
    > >> > So passing UserID as the querystring value which involves database
    > >> > communication is recommended or passing UserName as the querystring
    > >> > value which doesn't involve any database communication is recommended?

    >
    > >> You're just thinking out loud, aren't you?

    >
    > >> --
    > >> Mike Brind- Hide quoted text -

    >
    > >> - Show quoted text -

    >
    > > Sorry, Mike, I couldn't exactly get you....

    >
    > Well, calls to databases are expensive, and a good way to hamper the
    > scalability of a site. So the rule of thumb is only make calls when
    > absolutely necessary, and make them as short and sweet as possible. If you
    > already have a value on page1, and passing that value to page2 using the
    > querystring makes it available to that page thus negating an expensive
    > additional and unnecessary call to the database, I would have thought the
    > answer was self-evident.
    >
    > Your post reads like someone mentally weighing up 2 options out loud, only
    > to arrive at the correct answer themselves, and therefore not requiring an
    > answer from anyone else. Hence my equally rhetorical response :)
    >
    > --
    > Mike Brind- Hide quoted text -
    >
    > - Show quoted text -


    Thanks, Mike, for your answer. Actually my English is not so good;
    that's the reason why I couldn't understand your first response.

    Anyway, thanks once again,

    Regards,

    RON
    , May 10, 2007
    #6
    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. DC Gringo
    Replies:
    1
    Views:
    444
    Cor Ligthert
    Sep 6, 2004
  2. Mehdi
    Replies:
    6
    Views:
    36,106
    sloan
    Apr 6, 2006
  3. =?Utf-8?B?UmljaGFyZCBTdGVlbGU=?=

    QueryString Parameter Substitution

    =?Utf-8?B?UmljaGFyZCBTdGVlbGU=?=, May 4, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    2,527
    Karl Seguin [MVP]
    May 4, 2006
  4. OS538DAV
    Replies:
    0
    Views:
    886
    OS538DAV
    Nov 22, 2006
  5. Adeel Ahmad
    Replies:
    1
    Views:
    446
    Anthony Jones
    Mar 7, 2006
Loading...

Share This Page