473,387 Members | 1,864 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,387 software developers and data experts.

Setting value of parameter in ObjectDataSource

I have an object data source, that takes a parameter sortData, that sorts
the data, now I want to have the sorting set to a default value when i first
load the ASP.Net 2.0 page. I've tried to set the DefaultValue of the
parameter but it doesn't change the sorting.
I've also tried to see if i could set the value of the parameter in the
SelectParameters collection of the object data source, but there is no way
to set the value, so my question is: How do i set the value of the object
data sources parameter to some default value the first time the page loads?

Kind Regards,
Allan Ebdrup
Nov 21 '06 #1
1 1652

I found a solution, I set the SortExpression in the Selecting event of the
object data source.
Nov 21 '06 #2

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

Similar topics

1
by: sck10 | last post by:
Hello, I have a GridView that list all the employees in our group. My select button (link) when clicked will open a DetailsView control of the employee selected. I have one BoundField in the...
2
by: Charlie | last post by:
Hi: I'm using the ObjectDataSource control to databind a Repeater. The method on business object that ObjectDataSource control point to takes as a parameter an instance of the...
1
by: tparks69 | last post by:
Can anyone tell me is there an easy way to get a value into an objectdatasource select parameter from Application Variables? Obviously its easy from cookies, session etc... but what about...
2
by: JJ | last post by:
How can I set an ObjectDataSource's Parameter programmatically? The slight complication here is that I want to set this NOT in the 'Selecting' method of the ObjectDataSource, but elsewhere. I...
1
by: MAQ | last post by:
Hi, I have 2 ObjectDataSource on my page "OderDetailDataSource" and "CustomerDataSource". The first datasource returns only one record, out of which there one column called "CustomerID". The...
4
by: shapper | last post by:
Hello, I am trying to define an ObjectDataSource parameter that is a Guid: ObjectDataSource.DeleteParameters.Add(New Parameter("ID", TypeCode.Int32)) However TypeCode does not have an...
0
by: shapper | last post by:
Hello, I am trying to define an ObjectDataSource delete parameter. The parameter name is "TagID" and is a Guid: ObjectDataSource1.DeleteParameters.Add(new Parameter("ID", TypeCode.Object)) ...
0
by: =?Utf-8?B?UGF1bA==?= | last post by:
I have a ListBox server control named "lb_dates" with a SelectionMode of "Multiple". The user can select multiple dates from the listbox. I have ObjectDataSource named "ods_rfq" with a...
6
by: Ahmedhussain | last post by:
Hi there, I m doing work on a gridview and Im getting an error: A potentially dangerous Request.Form value was detected from the client (ctl00$Content$GridView1$ctl03$TextBox1="<span...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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,...

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.