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

<asp:SqlDataSource>

How do I set parameters from code for a SqlDataSource?
--
Arne Garvander
(I program VB.Net for fun and C# to get paid.)
May 10 '06 #1
1 1311
Dim sqlParam1 As System.Web.UI.WebControls.Parameter

sqlParam1 = New
System.Web.UI.WebControls.Parameter("ParameterName IsCaseSensitive",
SqlDbType.NVarChar, 35)

sqlParam1.DefaultValue = "Bill Gates is Number One"

sqlParam1.Direction = ParameterDirection.Input

SqlDataSource1.SelectParameters.Add(sqlParam1)

SqlDataSource1.SelectParameters.Add("secondParam", "Bill Gates is greate")

"Arne Garvander" <Ar***********@discussions.microsoft.com> wrote in message
news:35**********************************@microsof t.com...
How do I set parameters from code for a SqlDataSource?
--
Arne Garvander
(I program VB.Net for fun and C# to get paid.)

May 10 '06 #2

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

Similar topics

2
by: OutlookNewbieDev | last post by:
Hello, I'm new to ASP.NET but have done quite a bit of classic ASP. I need to drill down to another page from the DataGrid using a record's ID. In classic ASP, this was quite easy but I can't...
1
by: Peter | last post by:
I found one aspx page in a PC for ASPX learning, in one web control, <asp:SqlDataSource>, one of its attribute is as below: ConnectionString=<%$ConnectionStrings:Northwind %> The page works. And...
4
by: googlegroup | last post by:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionString:SalesDBConnectionString %>" SelectCommand="<%=strSQL%>" /> In ASP.NET , how do you assign a dynamic...
0
by: Radu | last post by:
Hi. On the first page of my website the user selects one document which can be in either English or French. I store that choice in a class, and I can extract it with:...
2
by: MikeB | last post by:
Hello All, how can I set my selectparameter to a constant value within my constants class or to a value in my web.config file?
3
by: Homer J. Simpson | last post by:
I have the following stored procedure: ALTER PROCEDURE . AS BEGIN SET NOCOUNT ON; SELECT COUNT(*) FROM QUICKNOTES END ....and the following data source in my .aspx file:
0
by: KUVU | last post by:
I am using FormsAuthentication.SetAuthCookie(txtbox1.text,false) in my login page. In my search.aspx i need to pass this login name to sqldatasource,delete commamd i am using...
3
by: RobertTheProgrammer | last post by:
Hello, Hopefully this is a simple question. I'm using an ASP.NET GridView. I'm setting the SQL in my SelectCommand's SqlDataSource. I have a need to qualify a field with a "<" symbol, but...
4
by: justice750 | last post by:
Hi All, I am using a FormView control. The allows me to update records in the database. However, when a database field is null I can not update the field on the form. It works fine when the field...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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: 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
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
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...

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.