Hello ,
I have bind the gridview with sqldatasource but whenever is execute my program it show following error:
"Both DataSource and DataSourceID are defined on 'GridView1'. Remove one definition."
Now how to solve this error????????
Error
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Dipankar BiswasRank #992 · 2K reputationPosted Nov 26, 2014, 10:56 PM EST
http://www.codeproject.com/Questions/255064/Both-DataSource-and-DataSourceID-are-defined-on-Gr
Ashok Yadav184 reputationPosted Nov 26, 2014, 10:57 PM EST
Remove DatasourceID from gridview designview souce highlighted in bold
===============
=========
if you want to acheive through Codebehid Datasource
2.Condition
Remove Datasource and databind from code behind
//Grd.Datasource=dt;
//Grd.Databind();
ancy chacko70 reputationPosted Nov 26, 2014, 11:08 PM EST
After Removing DatasourceID from gridview next error will display
"The IListSource does not contain any data sources."
can you please help me
Ashok Yadav184 reputationPosted Nov 26, 2014, 11:20 PM EST