get a variable from a datasource without gridview or form

aliakbar

New Member
I have an ASP.NET Page.It creates a datasource like this: \[code\] <asp:ObjectDataSource ID="uxOrderSource" runat="server" SelectMethod="OrdersGetOne" TypeName="Vevo.Domain.DataSources.OrdersDataSource"> <selectparameters> <asp:QueryStringParameter Name="orderID" QueryStringField="OrderID" Type="String" /> </selectparameters> </asp:ObjectDataSource>\[/code\]And then it uses the datasource here like this: \[code\] <asp:FormView ID="uxOrderView" runat="server" DataSourceID="uxOrderSource" CssClass="CheckoutCompleteCustomerFormView">\[/code\]And then it references the email field in that datasource like so: \[code\]<%# Eval("Email") %>\[/code\]My Problem is, way before this form is created on the page, I need to pull that email out and set a script var with its value, so that I can use it while the order line items are being iterated. Because for every order line item (which happens on the page BEFORE the form is created) I need to call a third party API and send in line item information, but that line item info also needs an email, and the email does not exist in the order line item datasource.
 
Back
Top