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????????
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ashok YadavPosted Nov 27, 2014, 4:20 AM
ancy chackoPosted Nov 27, 2014, 4:08 AM
After Removing DatasourceID from gridview next error will display
"The IListSource does not contain any data sources."
can you please help me
Ashok YadavPosted Nov 27, 2014, 3:57 AM
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();
Dipankar BiswasPosted Nov 27, 2014, 3:56 AM
http://www.codeproject.com/Questions/255064/Both-DataSource-and-DataSourceID-are-defined-on-Gr