Use a result field from one datasource as a select parameter in another

I have a details view which returns all of a clients details based a contract number sent to a stored procedure. I want to use the returned clientID from that query as a query parameter in separate stored procedure to display all of the sites associated with that client. Does anyone know how I can achieve this? On this page I want to use the information for when a user edits the sites field in the contractsDetail view, so it returns all of the sites in checkboxes; but on another page I wish to do this when the page loads.

Also, can I make it so that when the user clicks update for the contractDetails view it sends the checkbox values to the other datasource? 

<asp:ObjectDataSource ID="ContractDataSource" runat="server"
        SelectMethod="GetSupportContract" SortParameterName="sortExpression"
        TypeName="SupportContractDB" DataObjectTypeName="SupportContractDetails"
        UpdateMethod="UpdateSupportContract" DeleteMethod="DeleteSupportContract">
        <SelectParameters>
            <asp:Parameter Name="sortExpression" Type="String" />
            <asp:QueryStringParameter Name="contractRef" QueryStringField="contractRef" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>

<asp:ObjectDataSource ID="CustomerSitesDataSource" runat="server"
    SelectMethod="GetCustomerSites" TypeName="SiteDB">
        <SelectParameters>
            <asp:Parameter Name="custID" Type="String" />
            <asp:Parameter Name="sortExpression" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>

 <h4>Contract Details</h4>
    <asp:DetailsView ID="ContractDetails" runat="server" CellPadding="4" DataSourceID="ContractDataSource"
        ForeColor="#333333" GridLines="None" AllowPaging="True"
        AutoGenerateRows="False" DataKeyNames="contractRef, ClientID">
        <Fields>
            <asp:TemplateField HeaderText="Client Name" SortExpression="Client">
                <ItemTemplate>
                    <%#Eval("Client")%>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:DropDownList ID="CustomerDDL" runat="server" AppendDataBoundItems="true"
                     DataSourceID="CustomerDataSource" DataTextField="CustomerName"
                     DataValueField="CustomerID" SelectedValue='<%#Bind("ClientID")%>' >
                    <asp:ListItem Value="">Select a company</asp:ListItem></asp:DropDownList>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Site Name" SortExpression="Site">
                <ItemTemplate>
                    <asp:Repeater ID="SiteListRepeater" runat="server"
                    DataSourceID="SiteContractDataSource" >
                        <HeaderTemplate><ul style="list-style: none; margin:0"></HeaderTemplate>
                        <ItemTemplate><li><%#Eval("siteName")%></li></ItemTemplate>
                        <FooterTemplate></ul></FooterTemplate>
                    </asp:Repeater>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:CheckBoxList ID="selectSites" runat="server"
                    DataSourceID="CustomerSitesDataSource" DataTextField="SiteName" DataValueField="SiteID">
                    </asp:CheckBoxList>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:CommandField HeaderText="Options" ShowEditButton="True" ValidationGroup="contractGroup" />
        </Fields>
    </asp:DetailsView>

Please let me know if anything isn't clear, and i'll do my best to explain it.

Thanks,
Daf

 

0
daffydowden
9/5/2007 6:21:04 PM
asp.net.getting-started 91979 articles. 4 followers. Follow

14 Replies
647 Views

Similar Articles

[PageSpeed] 30

You should be able to store the result of the first SP into a HiddenField - make sure it's an ASP.NET HiddenField control, not an HTML control. Then grab the value of that control as a parameter for the second datasource.

  Something like this if done declaratively (this is in the second datasource's markup, "HiddenField1" is the name of the hidden field control, replace "nameOfParameter" with the parameter's name):

<SelectParameters>
                <asp:ControlParameter ControlID="HiddenField1" Name="nameOfParameter" PropertyName="Text" Type="String" />
</SelectParameters>

 As for updating the one datasource when the user clicks a button, just call the DataBind() method of that datasource in the button's Click() event.

 

HTH,

-Andrew


Please remember when your post is solved, to "Mark as Answer" the post(s) that solved it!
0
AndrewCushen
9/5/2007 9:18:24 PM

Thanks for the help Andrew, but i'm getting an error using the following code:

<asp:ObjectDataSource ID="SiteContractDataSource" runat="server"
    SelectMethod="GetContractSites" TypeName="SiteDB">
        <SelectParameters>
            <asp:QueryStringParameter Name="contractRef" QueryStringField="contractRef" Type="String" />
            <asp:Parameter Name="sortExpression" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>

    <asp:ObjectDataSource ID="CustomerSitesDataSource" runat="server"
    SelectMethod="GetCustomerSites" TypeName="SiteDB">
        <SelectParameters>


            <asp:ControlParameter Name="custID" ControlID="ContractDetails$clientIDField"
            PropertyName="Value" Type="String" />


            <asp:Parameter Name="sortExpression" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>

<asp:DetailsView ID="ContractDetails" runat="server" CellPadding="4" DataSourceID="ContractDataSource"
        ForeColor="#333333" GridLines="None" Height="50px" Width="250px" AllowPaging="True"
        AutoGenerateRows="False" DataKeyNames="contractRef, ClientID">
        <Fields>
            <asp:TemplateField HeaderText="Client Name" SortExpression="Client">
                <ItemTemplate>
                    <asp:HiddenField ID="clientIDField" runat="server" Value='<%#Bind("ClientID")%>' />
                    <%#Eval("Client")%>
                </ItemTemplate>

            <asp:TemplateField HeaderText="Site Name" SortExpression="Site">
                <ItemTemplate>
                    <asp:Repeater ID="SiteListRepeater" runat="server"
                    DataSourceID="SiteContractDataSource" >
                        <HeaderTemplate><ul style="list-style: none; margin:0"></HeaderTemplate>
                        <ItemTemplate><li><%#Eval("siteName")%></li></ItemTemplate>
                        <FooterTemplate></ul></FooterTemplate>
                    </asp:Repeater>
                </ItemTemplate>
               
                <EditItemTemplate>
                    <asp:CheckBoxList ID="selectSites" runat="server"
                    DataSourceID="CustomerSitesDataSource" DataTextField="SiteName" DataValueField="SiteID">
                    </asp:CheckBoxList>
                </EditItemTemplate>
            </asp:TemplateField>

 .... etc ....
</asp:DetailsView>


 The error says:

Could not find control 'ContractDetails$clientIDField' in ControlParameter 'custID'.

I tried using both bind and eval to the hidden field and also using just the ID's name rather than the id name and details view name.

Any idea why it's doing this?

Cheers, Daf 

0
daffydowden
9/6/2007 1:12:39 AM

Well, clearly it can't find the form field.

I just looked at my project that used this technique, and realized that I was using a FormView, and I placed the other control- a datagrid - and its datasource - inside the FormView. That allowed me to reference the HiddenField of the FormView directly, by its name alone, without having to add on the FormView$ in front.

Will that approach work for you? If not, get back to me and I'll see if I can get you past this speedbump.  

<EDIT>OK, this is the other approach I've used: in the second datasource's databinding event, you can access the value in the hidden field and add it as a parameter.

Something like this, perhaps: 

        Dim hf As HiddenField = CType(ContractDetails.FindControl("Order_NumberLabel"), HiddenField)
        If Not hf Is Nothing Then
            SiteContractDataSource.SelectParameters.Add("CustID", System.TypeCode.String, hf.Value)
        End If

No guarantees that I have all the names of the datasources and controls right; I just had a few minutes to look at this. 

Let me know if you're still stuck...

</EDIT>

-Andrew


Please remember when your post is solved, to "Mark as Answer" the post(s) that solved it!
0
AndrewCushen
9/6/2007 2:49:54 AM

Thanks Andy,

I'm actually working in C# but i've made an attempt to convert your code as follows:

 

1    HiddenField hf = (HiddenField)ContractDetails.FindControl("clientIDField");
2            if (!(hf is Nullable)) {
3                CustomerSitesDataSource.SelectParameters.Add("CustID", System.TypeCode.String, hf.Value);
4            }
Please let me know if this is incorrect.
<asp:ObjectDataSource ID="CustomerSitesDataSource" runat="server" 
SelectMethod="GetCustomerSites" TypeName="SiteDB">
<SelectParameters>
<asp:Parameter Name="sortExpression" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
I'm getting an error when I run this bit of code however:
ObjectDataSource 'CustomerSitesDataSource' could not find a non-generic 
method 'GetCustomerSites' that has parameters: sortExpression, CustID,
CustID1.
 
Not sure where that second custID has come from!? 
 
0
daffydowden
9/6/2007 4:01:14 AM

I believe it would look like this in C#:

HiddenField hf = ((HiddenField)ContractDetails.FindControl("clientIDField"));
	if (! hf == null
	{
		SiteContractDataSource.SelectParameters.Add("CustID", System.TypeCode.String, hf.Value);
	}
		

As for that second custID, make sure you remove the control parameter I first suggested before trying this. Otherwise you're trying to add the parameter twice.

I'm off to bed now- East Coast USA time zone and all that- but if you're still struggling, post the details and I'll try to have a look in the AM.

-Andrew


Please remember when your post is solved, to "Mark as Answer" the post(s) that solved it!
0
AndrewCushen
9/6/2007 4:22:31 AM

 Andrew, I changed the code and checked that I've removed the control parameter, but i'm still getting the error.

I had to make one minor alteration to the code you provdided:

HiddenField hf = ((HiddenField)ContractDetails.FindControl("clientIDField"));
        if ( hf != null)
        {
            CustomerSitesDataSource.SelectParameters.Add("CustID", System.TypeCode.String, hf.Value);
        }

<asp:ObjectDataSource ID="CustomerSitesDataSource" runat="server"
    SelectMethod="GetCustomerSites" TypeName="SiteDB">
        <SelectParameters>
            <asp:Parameter Name="sortExpression" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>

Could it be something to do with my method in my DAL?

 

1    /*Get sites for a customer */
2        public List GetCustomerSites(string custID, string sortExpression)
3        {
4            //create collection for sites
5 List sites = new List(); 6 7 SqlConnection con = new SqlConnection(connectionString); 8 SqlCommand cmd = new SqlCommand("GetCustomerSites", con); 9 cmd.CommandType = CommandType.StoredProcedure; 10 11 cmd.Parameters.Add(new SqlParameter("@custID", SqlDbType.Int, 4)); 12 cmd.Parameters["@custID"].Value = custID; 13 14 SqlDataAdapter adapter = new SqlDataAdapter(cmd); 15 DataSet ds = new DataSet(); 16 17 try 18 { 19 con.Open(); 20 //SqlDataReader reader = cmd.ExecuteReader(); 21 adapter.Fill(ds, "tblSite"); 22 } 23 catch (SqlException err) 24 { 25 throw new ApplicationException("Data Error: " + err.ToString()); 26 } 27 finally 28 { 29 con.Close(); 30 } 31 //apply any sorting 32 DataView view = ds.Tables[0].DefaultView; 33 view.Sort = sortExpression; 34 35 foreach (DataRowView row in view) 36 { 37 SiteDetails site = new SiteDetails( 38 ...Site Detail fields... 39 sites.Add(site); 40 } 41 return sites; 42 }
 Thanks for your continuing help with this, much appreciated!
Daf
0
daffydowden
9/6/2007 5:49:02 PM

If you're still getting that same exact error, it sure looks like the parameter is being sent twice...

BTW, I don't see any problems with the adjustment you made to my C# code- VB.NET is my primary language.

Let's try to simplify this. I have a feeling I'm not getting the details right. Correct me on the following if I'm wrong on any of these:

  • "CustomerSitesDataSource" is the datasource, and "ContractDetails" the DetailsView control, that will supply the parameter for the other datasource
  • "ClientIDfield" is the hidden field in "ContractDetails" that will become the parameter to the other DataSource
  • "ClientID" is a string 
  • "SiteContractDataSource" is the datasource that will receive the parameter from "CustomerSitesDataSource"
  • The field in "SiteContractDataSource" that will receive the ClientID is named "custID", and it's expecting a string.

Am I right on all of the above? And is the error you're getting exactly the same as before?

-Andrew


Please remember when your post is solved, to "Mark as Answer" the post(s) that solved it!
0
AndrewCushen
9/6/2007 6:14:41 PM

I think reviewing my code and what I want it to achieve will help me too!

Ok so, this part of the page lists details about a contract. These details are pulled from the ContractDataSource and displayed in the contractDetails detailsView.
A contract has a single client/customer ID associated with it, and also has many sites, and the sites also belong to many contracts, so there is a join table in the DB for sites and contracts.
Sites that are associated with the contract are pulled through the SiteContractDataSource based on the contractRef queryfield and sent to a SP. Because the details about a contract could be incorrect I want to give the user the ability to edit the details about a contract and this requires the ability to add and remove sites from the contract. In order to do this, when the user clicks edit on the contractDetails details view and site field uses another different datasource which will pull all of the sites that a company has associated with it from a table in the DB containing the details for every site. This datasource, CustomerSitesDataSource, requires the custID as part of the SP in order to retrieve customer sites. The sites will then be listed in check boxes, and the user will then check or uncheck sites that aren't part of the contract. Upon clicking update both the ContractDataSource and SiteContractDataSource will update their respective tables.

Phew... I believe that is all coreect, and I hope that it makes more sense now.  This is my first .Net 2.0 project, it's bogging me down to say the least, lol.

Daf


 

0
daffydowden
9/6/2007 6:41:33 PM

Ah.

I think I have approached the same issue in a different way- I have the first part, in your case the Contract, in a FormView. At the bottom of that FormView but inside the FormView, I have a GridView that holds what in your case would be all the sites associated with the contract and a datasource to pull them. The user can edit any of the sites by clicking them and clicking a button which opens a new window for just that site, which contains a FormView with Edit capabilities. To associate or disassociate a given site with a given contract, I provided 2 separate buttons in the main FormView which call an SP, passing the ID of the site.

I don't know which approach is better, if either is; I do know I was able to get mine working! ;-)

At this point I think the best advice I can give, without having you send me the entire project and database (not likely!) would be to double-check the following:

  • that all datasources, the SP, and the DAL are expecting the variable as a string
  • that the field is named the same everywhere
  • that the SP itself is working if you manually pass it data
  • I know this is heretical, but temporarily try cutting the DAL out and placing your SQL statement directly into the datasource. That's the quickest way to tell if the issue is in the presentation layer or the DAL.

The only other thing I can think of is a timing issue, where the 2nd datasource isn't getting the parameter soon enough. That's why I took the approach of bundling the 2nd datasource and its display (the gridview in my case) inside the FormView.

If you are still having problems after all the above, let me know and I'll try to whip up a quick sample that pulls against the Northwind SQL db. Perhaps seeing that would help.

-Andrew


Please remember when your post is solved, to "Mark as Answer" the post(s) that solved it!
0
AndrewCushen
9/6/2007 7:51:12 PM

I think i've just solved it without having to have multiple duplicated datasources and the like.

All I did was clear the select parameters on the datasource before adding the new ones, like so:

HiddenField hf = ((HiddenField)ContractDetails.FindControl("clientIDField"));
        if ( hf != null)
        {
            CustomerSitesDataSource.SelectParameters.Clear();
            CustomerSitesDataSource.SelectParameters.Add("CustID", System.TypeCode.String, hf.Value);
            CustomerSitesDataSource.SelectParameters.Add("sortExpression", System.TypeCode.String, "");
        }

Not sure if the sort expression will still work, but I'm not using that yet.

The hidden field is still in the details view in the item template for one of the fields, which I think is sufficient. If it turns out not to be, then perhaps I'll duplicate it and place it in the edit field as well.

Thanks for all your help on this. I hate these kind of weirdly resolved problems!

daf 

0
daffydowden
9/6/2007 9:06:55 PM

Man, that's weird.

So you must be adding a second clientID parameter somewhere.

I sympathize with "if it aint' broke don't fix it", but if it was me, I'd track down where the additional parameter is being added, to avoid the workaround. I know it can be done without the Parameters.Clear() because I have 2 pages in my current project that are doing it...

I'm glad things seem to be working. If you feel that any of my posts helped, feel free to mark one of them as "Answer" so I get the points. If not, that's fine too. But either way, when you're done, please mark your post "resolved".

 

Let me know if you need any further help...

-Andrew


Please remember when your post is solved, to "Mark as Answer" the post(s) that solved it!
0
AndrewCushen
9/6/2007 9:18:25 PM

Hey,

I think I realized what the issue is.

 If you're up for a quick experiment, try something for me:

  1. Check if you have placed the parameter into the list of <SelectParameters> in the DataSource. If not, stop here, never mind.
  2. If you have, remove it temporarily, along with any other parameters you're going to add back programmatically.
  3. Get rid of the CustomerSitesDataSource.SelectParameters.Clear(); line.
  4. Run the app and see what you get.

Let me know if that fixes it. I have a strong feeling it will...

-Andrew


Please remember when your post is solved, to "Mark as Answer" the post(s) that solved it!
0
AndrewCushen
9/7/2007 2:30:04 AM

Hey Andy, I tried the experiment of removing all of the parameters in the select and adding them programmatically, and weirdly enough it gives this error:

ObjectDataSource 'CustomerSitesDataSource' could not find a non-generic method 'GetCustomerSites' that has parameters: CustID, sortExpression, CustID1, sortExpression1.

Which led me to using the clearing solution. I was thinking perhaps it's getting these values through reflection or something when it checks the method. I think for this one I'm going to have to go with the "if it ain't broke" route, I don't really want to waste anymore time on it.

Thanks for all your help. I'll give you the points unless someone else later resolves this within this post.

Cheers, Daf 

0
daffydowden
9/8/2007 2:25:53 AM

OK, this is really getting weird now.

There's absolutely no reason why it should be trying to add those parameters twice!

The only thing I can think of at this point is to take a quick look at your DAL and maybe your SP- and a quick scan through ALL your code-behind server-side code- to make sure nothing is adding those extra parameters somewhere. Obviously something somewhere is adding them!

Unless the file is just weirdly corrupted somehow. I have heard of cases, and even experienced it once myself, where nothing would fix a problem until all the code and markup were copied into new files, and the old files deleted. Perhaps that's what's going on.

One final thought is that something somewhere is caching the parameters. I assume you've tried clearing all the browser caches and re-booting? I even have a shortcut on my dev machine that re-starts I.I.S. with a batch file containing: IIsreset /noforce that has saved my sanity a few times. I don't suppose the DAL does some kind of caching? Or you have it turned on somewhere?

Anyway, good luck...

-Andrew


Please remember when your post is solved, to "Mark as Answer" the post(s) that solved it!
0
AndrewCushen
9/8/2007 9:04:40 PM
Reply:

Similar Artilces:

How to use GridView row's Key selected for Delete as select parameter for another datasource
I'm not sure if the subject title makes sense, but it wasn't too easy to describe what I'm trying to do in one sentence! When a user clicks on the delete link in a GridView row, I want to run a stored proc, using the Key of the selected record as the parameter for the stored proc. I then want to programatically access the result of the stored proc (it'll be an integer value) for code-behind use. I wrote out a few steps to help me figure out what I need to do: 1) Get the value of PersonnelID (the DataKey) from the selected row in the GridView2) Set that Perso...

How do I get the parameter for the delete command when I get the parameter for the select in another way?
I'm working with VS 2008.  I've got a data grid control, which I populate through a DropDownList that is data bound using a stored procedure.  When the DDL changes it updates the contents in the DataView control.  The DataView control is also data bound, and is populated using its own stored procedure and the code returned from the DDL once the user selects something.  I've got another stored procedure assigned to the DeleteCommand of the SqlDataSource, which I intend to use is with a delete CommnadField of the DataView control.  However, in this case I w...

Selecting value in one field then causes value in another field to be selected.
I have a web form which contains a date field, the date is populated using a DatePicker which is Javascript based. The form also has a drop down box containing 3 values. What I want to do is when a date has been selected that this will cause the dropdown list value to change to dated which is one of its 3 values. i.e. when the date field is not blank then the value will be selected in the dropdown. What I also want to happen is when the date has been selected and the dropdown value is dated then the date field and the dropdown field will be set to read only.Anyone any ideas how to this usin...

How to get value of field in one DataView into an Select statement for another DataView?
I have a DataView, called DataView1, that is showing the data from a table called INFO.  A DetailsView is attached to this DataView.When I click the Select link on a record for DataView1, I want the value of a certain field of DataView one to be put into the Select query of DataView2.  The reason being is this.DataView1 contains the data for my INFO table.DataView2 contains the data for my FILES table.INFO can have many FILES.Files can only have one INFO.  So when I click the Select link on a record on my DataView1(INFO table), I want only the files associated with t...

All Listed Datagrid Results from one database used in a datasource query for another Datagrid.
I have two separate databases with separate connection strings.   DataGrid (1) list a series of names from database (1).   How can the second DataGrid (2) datasource (2) use the DataGrid (1) LISTed values in it's query?  The query input requires the entire list.  Consequently, gridview1.selectedvalue does not appear to be an option. Thanks for your time,  Sincerely, Unhistoric   I'm not sure if I follow your statement above, but if you want to use the first DataSource as your Grid 2 DataSource then y...

Custom Parameter for Select Paramters
SELECT     ArticleID, ArticleTitle, ArticleDate, Published, PublishDate, PublishEndDateFROM         UserArticlesWHERE     (ArticleDate >= PublishDate) AND (ArticleDate <= PublishEndDate) When I use the above on a GridView I get nothing.  Using SQL manager it works great. I don't know how to pass the value of the ArticleDate field as a default parameter or I think that's what I don't know how to do. I am trying to create a app that I can set the dates an article will appear on a page...

using a datasource results in another datasource help pls
Have 2 data sources one pulls the useriD from a table the other needs to use this information to match it up with the userName in another table.. 2 different sql servers  should i throw the results in a variable and use it that way'?  i am used to classic asp and recordsets.. i know it will be similar but any help would def be nice. soething along these lines?   datasource1 "select userId from table" var = datasource1.userIdnext datasource2 "select userName from table where userId = 'var' "nextApplciation Developer bumpApplciation De...

how to make one list box(this list box should have selected products) gets filled from another list box (for example this list box has the whole products) by using navigation control
Hello Mate!, I have two list boxes. one should get populated with whole products. and i have another list box in which i have to move some of the products which i like .   The design should be the one below: List Box1   List Box 2 all products   Selected products BMW    >> BMW BENZ     > LEXUS AUDI     <   LEXUS    <<     Could you please suggest me whether i have to use buttons(by which i move items from one list box to another)  ...

Is it possible to use a variable(computed field) as a parameter to another computed field
--____TAYPSSOPSIQFPCQHOOXS____ Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable I am using pb 7 , datawindow painter, a computed column I am trying to get column data from different rows in grouped data from a = datawindow. The easiest way to get the data was to just put the column = name and the row needed ..ie run_seconds[-10] . This works fine except I = need to get different rows based on rowcount for that group. What that = means is that for one group I would need row 3,10 and 20. For the next = group I would need rows 12, 15, 50 and ...

How to select a field value from a selected row from a DataGrid in order to use it as a parameter
I am working on a web application, and I have two DataGrids.  Then end-User is supposed to select a row from one of the grids, and the event should select a key from that row in order to use it as a parameter to fill the other DataGrid.  I have been trying to do so, but I dont work the same way as I used to do it in windows applications.   I would appreciate any suggestions,   Thanks. Is there some code we can look at? I've done similar things and I've never had any problem with them. In the first grid have a select column, when it is clicked you can catch the Sel...

how to get the cursor to jump from one textbox field to another textbox field.
Hi,,I have two textbox fields.  the first textbox field has a fixed length of 3.  Ideally i want that once the 3rd character has been entered into the first textbox field the cursor should jump to the second textbox field.  How would i do that.thanks copy and paste this code in the HTML file for the page and test it then change it to what you like!!function autotab(original,destination){ if (original.getAttribute&&original.value.length==original.getAttribute("maxlength")) destination.focus() }   </script>  Enter your 10-digit phone number:...

selection in one ddl field makes another ddl as a required field.
I have to accomplish two scenarios: 1. I have two dropdownlist fields say A and B and A has options as 'xx','aa','bb','yy','ss' A is a required field, if user selects 'xx' or 'yy' from the dropdownlist A then I need to make B as a required field.  2. There is a datefield which is not required field. I need to let user enter 'N/A' in this field if they do not have any relevant date , the way i was trying to accomplish this task is : provide a checkbox in front of this date field, if user checks it  I will fill it w...

SELECT a single row with one SqlDataSource, then INSERT one of the fields into another SqlDataSource
What is the C# code I use to do this? I'm guessing it should be fairly simple, as there is only one row selected. I just need to pull out a specific field from that row and then insert that value into a different SqlDataSource.Disco Patrick writes web applications using:Visual Studio 2008ASP.NET 3.5C#SQL Server 2008 What do you mean by "insert one of the fields into another SqlDataSource"?  Do you mean you want to make use of the value as a parameter for another datasource control or that you actually want to use another SqlDataSource to insert the value into a table so...

Can I use a Formula Field or Report Parameter in my SQL Command when using a Command as my datasource?
Instead of having the database tables as my datasource, I'm creating a command (double clicking the Add Command Node under my server connection in the database expert) and using that for the fields on my report. I need to be able to use a formula field (or even a report parameter) in that command SQL so that I can pass dates that will change at runtime to my SELECT statement. Is that possible? Yeah it is possible but you have to preset the filters in your report and then pass the information (i.e. dates) as parameters. To learn how to do this there is an article on www.aspalliance.com/...

Web resources about - Use a result field from one datasource as a select parameter in another - asp.net.getting-started

Datasource - Wikipedia, the free encyclopedia
A DataSource object has properties that can be modified when necessary. For example, if the data source is moved to a different server, the property ...

Inverness Graham Acquires DataSource
Inverness Graham , a lower middle market private equity firm headquartered in suburban Philadelphia, has acquired DataSource , a print supply ...

SmartGlance for iPad for iPad on the iTunes App Store
Read reviews, get customer ratings, see screenshots, and learn more about SmartGlance for iPad on the App Store. Download SmartGlance for iPad ...

Chaitanya Pandit (@chaitanyapandit) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Data source - Wikipedia, the free encyclopedia
... Data source A data source is any of the following types of sources for (mostly) digitized data: a database in the Java software platform, datasource ...

2ndQuadrant - PostgreSQL expertise from specialists with a source code level understanding of RDBMS ...
PostgreSQL expertise from specialists with a source code level understanding of RDBMS PostgreSQL Planets Gabriele’s PlanetPostgreSQL Gianni’s ...

Tagged entries for CLOUD COMPUTING
Alan Williamson's output as a Java Champion, Blog-City Architect, BlueDragon Creator, Author, Speaker and Internet Guru

Private equity deals
... of biometric identity management systems, applications and services. www.crossmatch.com Inverness Graham Investment has acquired DataSource ...

C# C Sharp and Tutorials on C# Friends.com
Learn the c# langauge to build web applications using our online tutorials with live demos. Participate in our forums and learn from others. ...

JavaScript UI Library, Ajax Components & HTML5 Framework - DHTMLX
DHTMLX offers a rich JavaScript library, UI components & HTML5 mobile framework. Build impressive web apps for both desktop and mobile devices. ...

Resources last updated: 12/30/2015 8:00:18 PM