473,385 Members | 1,676 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.

sqldatasource help

hey all,
can someone please help me get the following snippet work?

protected void BtnSearch_Click(object sender, EventArgs e)
{
SqlDataSource4.SelectParameters.Add("@FirstName", TextBox1.Text);
SqlDataSource4.Select(DataSourceSelectArguments.Em pty);
GridView1.DataSourceID = "SqlDataSource4";
GridView1.DataBind();
}
i'm not getting any results back.

thanks,
rodchar
Jan 16 '08 #1
1 908
Start here.
http://msdn2.microsoft.com/en-us/lib...rs(VS.71).aspx
You might just want to try testing the number of rows that were returned, I
suspect there are zero rows returned.
--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------

"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:B5**********************************@microsof t.com...
hey all,
can someone please help me get the following snippet work?

protected void BtnSearch_Click(object sender, EventArgs e)
{
SqlDataSource4.SelectParameters.Add("@FirstName", TextBox1.Text);
SqlDataSource4.Select(DataSourceSelectArguments.Em pty);
GridView1.DataSourceID = "SqlDataSource4";
GridView1.DataBind();
}
i'm not getting any results back.

thanks,
rodchar
Jan 17 '08 #2

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

Similar topics

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...
3
by: Jim Andersen | last post by:
Just to let you know, and to help any future sorry sods who gets trapped in the same black hole...... You can't just copy/move a working sql-statement into a stored procedure. Working with a...
3
by: Dorte | last post by:
Hi, Could someone help me with a couple of links to SqlDatasource documentation on how to use the Gridview and SqlDatasource components in code behind? Basically I'm missing some documentation...
3
by: simonZ | last post by:
In gridView I have dropdown list : <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ProductID" DataSourceID="SqlDataSource1"> <Columns> <asp:BoundField...
0
by: Sam | last post by:
Folks, I am new to ASP.Net 2.0. I do not know what I did with my configuration settings... Now when I drag and drop Sqldatasource from the toolbox, I can't see it in the design view. Even...
4
by: | last post by:
I'm building some user controls. I very much like how you can build custom properties to be bound to a user control, and how instances of that control will show those custom properties in the...
6
by: Ken Fine | last post by:
I'm using SQLDataSource, which generates some kind of dataset, and then I attach that datasource to various data display controls such as DataList and repeater which loop through to the end of the...
2
by: John Kotuby | last post by:
Hi all, I have set up a page with a Repeater and a SQLDatasource control, the data control suggested by online Help for use with the Repeater. I am getting Timeout Expired after 30 seconds. I...
1
by: sheenaa | last post by:
Hello Members, I m creating my application forms in ASP.Net 2005 C# using the backend SQL Server 2005. What i have used on forms :: ? On my first form i have used some...
4
by: mohaaron | last post by:
This seems like it should be simple to do but for some reason I have been unable to make it work. I would like to databind a SqlDataSource to a GridView during the click event of a button. This...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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: 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
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.