473,385 Members | 2,028 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,385 software developers and data experts.

Adding Parameters in code, how?

hi

asp.net 2.0

I have a ObjectDataSource which I in my code wants to create the
SelectParameters for.
(reason as this GridView is used on multiple pages and hence sometime
parameters will differ)

ObjectDataSource ods = (ObjectDataSource)LoginView1.FindControl("odsCars" );
ods.SelectParameters.Add(new Parameter());

Problem, i don't know what arguments to send into the Paramer() constructor.
I want to define parameter name, default value (or value) and datatype

any suggestions?


Oct 28 '08 #1
1 1069

"Jeff" <it************@hotmail.com.NOSPAMwrote in message
news:Ol**************@TK2MSFTNGP06.phx.gbl...
hi

asp.net 2.0

I have a ObjectDataSource which I in my code wants to create the
SelectParameters for.
(reason as this GridView is used on multiple pages and hence sometime
parameters will differ)

ObjectDataSource ods =
(ObjectDataSource)LoginView1.FindControl("odsCars" );
ods.SelectParameters.Add(new Parameter());

Problem, i don't know what arguments to send into the Paramer()
constructor. I want to define parameter name, default value (or value) and
datatype

any suggestions?


Oct 28 '08 #2

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

Similar topics

5
by: surrealtrauma | last post by:
the requirement is : Create a class called Rational (rational.h) for performing arithmetic with fractions. Write a program to test your class. Use Integer variables to represent the private data...
11
by: Steven D'Aprano | last post by:
Suppose I create a class with some methods: py> class C: .... def spam(self, x): .... print "spam " * x .... def ham(self, x): .... print "ham * %s" % x .......
4
by: DotNetJunky | last post by:
I have built a control that runs an on-line help system. Depending on the category you selected via dropdownlist, it goes out and gets the child subcategories, and if there are any, adds a new...
1
by: tshad | last post by:
I have changed my code from a straight string for my Sql to Parameters and can't seem to get it to work. I have the following excerpts from my code: ...
20
by: Bryan | last post by:
hello all... im trying to add a record to an sql db on ms sql server 2000, using vb.net. seems to be working.. except for one thing, one of the columns in the database is a bit datatype, and...
3
by: MIGUEL | last post by:
Hi all, I'm quite lost with how adding web references to a project creates proxy classes. I've developed a web service with two classes inside and that contains three references to three...
1
by: jim4u | last post by:
Hi gurus, I have an automation add-in created using C# for Excel, in which I am exposing a number of functions. Is there any way I can add help-text the way excel does for other categories like...
1
by: Rich | last post by:
Hello, I can update a dataset from my client app using a dataAdapter.Updatecommand when I add parameter values outside of the param declaration. But If I add the param values inline with the...
3
by: Bart Van Hemelen | last post by:
I'm working on a project where the user of a site will receive custom content, depending on a set of parameters. The content will all be contained in UserControls (.ascx), that will be used as...
5
by: mnarewec | last post by:
Hi folks, I want to create a procedure where by it will take a sqlcommand, a string, and property. I want to use this procedure to add parameters to my sql command of type stored procedures since I...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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...

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.