473,699 Members | 2,531 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_StartDa te" 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:SqlDataSou rce ID="sqlds_CallH istory" runat="server"
ConnectionStrin g="<%$ ConnectionStrin gs:myConnection String %>"
SelectCommand=" sp_getCallHisto ry" SelectCommandTy pe="StoredProce dure"
DataSourceMode= "DataReader " >
<SelectParamete rs>
<asp:SessionPar ameter Name="userName" SessionField="u sername"
Type="String" />
<asp:ControlPar ameter ControlID="txt_ StartDate" Name="dateStart "
PropertyName="T ext"
Type="DateTime" />
<asp:ControlPar ameter ControlID="txt_ EndDate" Name="dateEnd"
PropertyName="T ext"
Type="DateTime" />
</SelectParameter s>
</asp:SqlDataSour ce>

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

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 1284

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

Similar topics

0
1645
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 passing parameters to limit the results: One person develops the report layout using a view. The other person creates a datatable at runtime from a stored proc
2
371
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 SelectedIndexChanged DataSourceChanged SelectedIndexChanged is there any way to check in SelectedIndexChanged event handler that
0
1768
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 happened always whenever DataSource is set, only called sometimes, in a series of setting DataSource, I could get this setting focus only one time . Can anybody help me how to stop this one. system.windows.forms.dll!
4
1122
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 different thread". I think this occurs because the grid wasn't created during the thread. How would I be able to set its datasource from within the thread? Thanks again.
4
4700
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 SqlParameter("@DebtorCodeID", ddlGetDebtor.SelectedItem.Value)) to to retrieve the Data
5
4476
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 ControlParameter <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:XYZ %>"
8
2263
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 happens. dim filt as string ... build filter string... UserControl.ReportFilter = filt
3
11555
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 can work with the returned records. In VB 6, I use DAO and do it this way: Dim db As Database Dim rs As Recordset Dim qd As QueryDef
1
1744
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 display the first value in the Text field of the combobox. ( or setting the Text property ).
0
8691
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8620
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9180
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9038
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8920
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8887
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6536
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2351
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.