Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > sqldatasource help

Reply
Thread Tools

sqldatasource help

 
 
rodchar
Guest
Posts: n/a
 
      01-16-2008
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
 
Reply With Quote
 
 
 
 
Alvin Bruney [ASP.NET MVP]
Guest
Posts: n/a
 
      01-17-2008
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" <> wrote in message
news:B553F3FF-9D0E-45AD-B456-...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving SqlDataSource to ObjectDataSource. need help Raja ASP .Net 2 03-14-2008 09:12 PM
HELP! How do you set data in the datasource when using SqlDataSource Dave ASP .Net 2 09-26-2007 06:35 AM
Using Parameters within SqlDataSource Object--Need Help~ Brad Isaacs ASP .Net 0 01-30-2007 01:04 AM
Session variables not being picked up by sqldatasource HELP! ASP .Net 0 10-25-2006 03:26 PM
GridView SqlDataSource Help Krish ASP .Net 2 01-30-2006 01:01 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57