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 contrac...Adding a default value to sql select parameters in vb.net
I know it's easy to select the default value if you use the sql data source object to configure your query and feed it the select parameters. However, i will like to know if it's possible or what's is the syntax to add a default value to sql query being executed before page is post back. Below is what i have so far: the text strikethrought is the missing piece i need help making it the default value.Dim connect As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("Solution_DA_LiveConnectionString").ToString())
Dim sqlcom...Selecting value in one field then causes value in another field to be selected.
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 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,
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...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/...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...linking a sql field to point to the value of another sql field
is it possible to create hyperlinks in powerbuilder such
that if you retrieve two fields from a database.. and want
to display the first field on the screen and have it link to
the value of the other field (when clicked) which is
actually a URL address, you can?
any help will be appreciated. thank you!
...How to pass parameter value from one sql datasource to another?
Here is the problem, how to pass the values from one datasource to another one on the same aspx page, without coding?
I have a page with FormView control to present data for one selected record from a search page, with edit item and insert item templates created. The main sql datasource keeps control on everything with select, update, delete and insert methods. For insert I am using existing stored procedure, for which the wizard generated all the required parameters. In Command and Parameter Editor I can see them, and I need to define all of th...Me again, sqldatasource/control paramters and using code as a default value
Hi , i'm trying to do somethign like this-
<asp:Parameter Type="String" DefaultValue="Request.UserHostAddress.Tostring()" Name="IP" />
But alas, the "Request.UserHostAddress.Tostring()" is being treated as a string before its being executed (if that makes sense)....
But if i remove the " " 's i get a compiler error, any ideas? i've tried stuff like adding ' in places, but its not helping.... if also tried withouth te type anmd loads of other goodies, but still not working.
Any help is appreaciated, its probably something reeally simpl...Using a Session field as default field value
I am brand new to ASP.NET, this is my first post here.
I have build a form, with a Formview control, set to Insert item. That page will be used to add record to a database.
I have a field called "Listing_Owner" which will store the Authentified user name.
I know how to get the User name, but I just don't know how to set the Username as default value for that owner field, which will be hidden.
I tried to write code in the Page_Load event, but it does not seems to find my field.
I hope it is clear, this is all new terms for me.
New to ASP... loo...Converting a gridView using an Sql Datasource to a gridview who is not using an SQL DataSource
How can i rewrite this page so that i doesnt make use of an SqlDataSource?
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="LoginHistory.ascx.cs" Inherits="Private_UserControls_WebUserControl" %>
<%--<link rel="stylesheet" href="BaldwinPortal.css" mce_href="BaldwinPortal.css" type="text/css" />--%>
<body style="margin:0 0 0 0;padding:0 0 0 0">
...Using selected values from a Multi Select Listbox in a SQL query
I have seen a few post concerning this but don't really understand fully as I am new to this. I would appreciate any help
1) First I loop through the Listbox control and get the selected values:
Dim li As ListItemFor Each li In lbPClass.Items
If li.Selected = True Then
strPC += li.Value & ", "
Label5.Text = strPC
The resulting string looks something like: 101, 102, 100 , I get rid of the last space and "," with the following statement
Label6.Text = Left(Label5.Text, Trim(Len(Label5.Text) - 2))
2) I would then like to ...How to change the SQL used for the GridView, when using a control parameter in the datasource
I'm using a GridVeiw with and Access database. I want to allow users to select a date and then update the GridView to show only data entered after that date.
So my question is, how do I modify the SQL used by the datagrid? I'm using a control parameter as part of my AccessDataSource and I think that is what I'm having trouble figuring out how to include.
Here is my datasource, with the control parameter in the the GridView. The GridView works fine with these initial settings settings.
<asp:AccessDataSource ID="AccessDataSourceForwView" runat="server" ConflictDetection="Compa...Is it possible to use a variable(computed field) as a parameter to another computed field
Content-Type: text/plain; charset=iso-8859-1
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 ...