Re-use data from sqldatasource control?

Discussion in 'ASP .Net' started by Mike, Dec 11, 2006.

  1. Mike

    Mike Guest

    On the page, I have a formview which shows details of a job, including its
    title and location. The data is fetched by a sqldatasource. Now I want to
    take the job title and location and create a page title out of it as well.
    Something like:

    (pseudo-code)
    protected void Page_Load(object sender, EventArgs e)
    { Page.Title = <jobtitle> + " " in + " " + <location>;}

    I kind of understand that the data is available to the formview because the
    sqldatasource is bound to it, but how do I access the data outside of the
    formview without running the select statement again?

    Thanks

    Mike
    Mike, Dec 11, 2006
    #1
    1. Advertising

  2. Mike

    Mike Guest

    No worries. I have the answer now.


    "Mike" <> wrote in message
    news:...
    > On the page, I have a formview which shows details of a job, including its
    > title and location. The data is fetched by a sqldatasource. Now I want
    > to take the job title and location and create a page title out of it as
    > well. Something like:
    >
    > (pseudo-code)
    > protected void Page_Load(object sender, EventArgs e)
    > { Page.Title = <jobtitle> + " " in + " " + <location>;}
    >
    > I kind of understand that the data is available to the formview because
    > the sqldatasource is bound to it, but how do I access the data outside of
    > the formview without running the select statement again?
    >
    > Thanks
    >
    > Mike
    >
    Mike, Dec 12, 2006
    #2
    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. =?Utf-8?B?VmVhcg==?=
    Replies:
    1
    Views:
    5,019
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    Mar 21, 2006
  2. =?Utf-8?B?RGFiYmxlcg==?=

    use data from second sqldatasource in gridview itemtemplate?

    =?Utf-8?B?RGFiYmxlcg==?=, Mar 20, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    4,045
    =?Utf-8?B?RGFiYmxlcg==?=
    Mar 21, 2006
  3. Carlos
    Replies:
    0
    Views:
    364
    Carlos
    Sep 21, 2006
  4. Guest
    Replies:
    2
    Views:
    1,879
    Guest
    Aug 18, 2007
  5. JohnE
    Replies:
    3
    Views:
    1,255
    JohnE
    Jan 31, 2010
Loading...

Share This Page