1.in aspx page using sqldatasource type controls
or 2. in code behind by using databind method and why?
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.
Kirtan PatelPosted Mar 11, 2010, 7:47 AM
like if you want more costomizability then you should choose Writing code behind as it gives much flexibility that you can do any thing with your code ..Like Taking Two Tables From database Apply relation on them in Code and Display it etc like operation hard to do with that SQLDataSource Control and if you dont want to do more hassle with code then you can use sqldataSource .
Hope it Solves ur doubt :)
if it helped you then please check "Do you like this answer" check box :)
Amit ChoudharyPosted Mar 11, 2010, 7:55 AM
you can use any of them. There is two way to bind Data Contorls, using design mode binding and using code behind binding.
You can use any that which is suitable to you but logical way of choosing is only like below.
if your data is required manipulation before binding or you want to bind rows with some more data than in datasource then Code behind is only way to do that.
But if you have to show data just as it comes from dataset then you can use sqldatasource type or Design mode binding.
Please mark as answer if get some help from this.