473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

asp.net 2.0, setting parameters for datasource

I am creating a page which displays a customers billing history.

As such it uses a datasource which queries the billing table.
This works fine, and outputs desired information I need. I need the
datasource parameters to show only todays information as a default.

And when i enter dates into 2 textboxes, i want the page to postback,
but use the values from these text boxes.
Code for Text Boxes
<asp:TextBox ID="txt_StartDate" runat="server" Style="z-index: 100;
left: 15px; position: absolute;
top: 82px"></asp:TextBox>
<asp:TextBox ID="txt_EndDate" runat="server" Style="z-index: 101; left:
270px; position: absolute;
top: 82px"></asp:TextBox>
<asp:Button ID="btn_getData" runat="server" Style="z-index:
111; left: 522px; position: absolute;
top: 80px" Text="Go" Visible="False"
PostBackUrl="~/dashboard/billingHistory.aspx" />
Code for DataSource
<asp:SqlDataSource ID="sqlds_CallHistory" runat="server"
ConnectionString="<%$ ConnectionStrings:myConnectionString %>"
SelectCommand="sp_getCallHistory" SelectCommandType="StoredProcedure"
DataSourceMode="DataReader" >
<SelectParameters>
<asp:SessionParameter Name="userName" SessionField="username"
Type="String" />
<asp:ControlParameter ControlID="txt_StartDate" Name="dateStart"
PropertyName="Text"
Type="DateTime" />
<asp:ControlParameter ControlID="txt_EndDate" Name="dateEnd"
PropertyName="Text"
Type="DateTime" />
</SelectParameters>
</asp:SqlDataSource>

When i click the button control, i want the page to postback, and use
the dates in my textboxes as the dateStart and dateEnd
SELECTPARAMETERS.

Any help would be appreciated. If you need more information to be of
assistance, please let me know.
Thanks all.

Oct 4 '06 #1
0 1267

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Slonjo | last post by:
I don't know if this has been addressed in some other form/forum but we tried what we thought was everything. I apologize if i'm being redundant. We build reports like so when they require...
2
by: TF | last post by:
hi, i am using a ListBox control on a windows form using VB.Net. when i set the DataSource property of the control to an ArrayList it fires following events in this order: SelectedIndexChanged...
0
by: Shravan | last post by:
Hi, I have a Windows Forms Custom DataGrid, which is put in a usercontrol, which on setting DataSource is setting focus to grid. The call stack for setting the focus is as follows. This is not...
4
by: VM | last post by:
In the thread, I create a tableX and fill it with data. When I set the grid's source to this tableX, I get a compiler error "Controls created on one thread cannot be parented to a control on a...
4
by: Patrick Olurotimi Ige | last post by:
I have a DropDown Lsit set to ddlGetDebtor.Items.Insert(0, "-Select Debtor Code-") which is setting the "-Select Debtor Code-" to be default And on PostBack i'm passng:- Cmd.Parameters.Add(New...
5
by: Martin Bischoff | last post by:
Hi, is it possible to modify the values of a SqlDataSource's select parameters in the code behind before the select command is executed? Example: I have an SqlDataSource with a...
8
by: David Lozzi | last post by:
Howdy, I have a user control that is a report to display data. On the page the control is inserted in, I have filter options to filter the report. When I try to do something like this, nothing...
3
by: eagleofjade | last post by:
I am trying to help a friend who is learning VB.net in school. I have done VB programming for a number of years using VB 6. He needs to open a query in an Access database that has parameters so he...
1
by: progressdll | last post by:
I'm trying to change the behaviour of setting the DataSource property of combobox. Here is the behaviour I now see. Setting the DataSource property of combobox to an ArrayList will visual...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.