Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 9th, 2007, 03:44 AM
Registered User
Join Date: Mar 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default manually populate from sqldatasource

Dear friends,
 I am trying following code, but it is not working could you please guide me (the connection string is successfully retrieved), I want to bind data to grid and well as form view

 SqlDataSource sqlds = new SqlDataSource();

 sqlds.ConnectionString = (ConfigurationManager.ConnectionStrings["bdirectConnectionString"]).ToString();

 sqlds.SelectCommandType = SqlDataSourceCommandType.Text;

 string country = Request.QueryString["country"];

 if (country != "")
                sqlds.SelectCommand = "select messers,btype,category,subcategory,contactpers,tel mob,fax,email,websites,address,locality,city,state ,country,pincode,adwordings from venddata where country like '%" + country + "%'";

GridView1.DataSource = sqlds;

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dataview, Populate manually not automatically. peterasimpson ASP.NET 2.0 Basics 0 April 13th, 2007 05:46 AM
Asp manually edit ik Classic ASP Professional 8 August 24th, 2006 08:33 AM
Asp manually edit ik Classic ASP Professional 0 August 18th, 2006 03:44 AM
Sorting GridView manually pettrer ASP.NET 2.0 Basics 3 June 5th, 2006 10:51 AM
NTServices can't start manually samgoh Pro VB 6 0 August 25th, 2005 08:22 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.