asp.net - GridView with both declarative (Html side) datasource and code-behind datasource -


in asp.net 3.5 web page, gridview control can have both sqldatasource , code-behind datasource (with datatable example)? both datasource equal (the same stored procedure).

thanks lot.

luis

it possible under 1 condition.that set datasourceid nothing of gridview before re-assigning datasource datatable.otherwise visual studio scream loudly @ in these lines 'both datasource , datasourceid defined on 'yourgrid'. remove 1 definition.'

 yourgrid.datasourceid=null;  yourgrid.datasource=yourdatatable; 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -