SqlDataSource

G

Guest

I am writing a sales order application that uses a DropDownList (within the
InsertItemTemplate of a FormView) for the user to select a customer from the
customer table. After the user selects a customer I want to default the
billing and shipping information into the formview. The SqlDataSource I am
using for the drop down includes (although does not display) this billing and
shipping information from the customer table. How do I get to this
information without requerying the database?
 
C

Cowboy \(Gregory A. Beamer\)

The SqlDataSource is a wrapper that is designed to make it easy to drag and
drop. It is not well suited for reuse ... unfortunately.

I would, personally, forgo the SqlDataSource and use your own SQL objects.
You can then store the DataSet easily.

There may be a way to pull off the SqlDataSource, but I have not found it,
or had the time to find it. :)

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
 
S

Steven Cheng[MSFT]

Hi BrassicaNigra,

Based on the scenario you mentioned, I think the main problem here is that
how to persist those "billing" & "shipping" info together with those
"customer" items in dropdownlist. I think here is a possible solution
available current:


** You can add two additional dropdownlists in addition to the "customer"
one, and these two dropdowns bind data to the "billing" and "shipping" info.

** You can set these two dropdownlist's client-side "style:display"
attribute to "none" so that they'll be hidden on the page.

** Then since each "customer" and the corresponding "billing" and
"shipping" info are persited in page markup, you can add client-side script
to find them and copy them between dropdownlist and the FormView insert
textbox fields. You can use the "customer" dropdownlist's "onchange" event
to do this.

How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Guest

That would probably work. I have found a different way of dealing with it
that works (using an additional SqlDataSource that is called using the
customer ID from the dropdownlist). Thank you for your help.
 
S

Steven Cheng[MSFT]

Hi BrassicaNigra,

Thanks for share your own solution with us.

Have a good day!

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top