vb.net - Not able to fetch data from sql database in asp.net web application using vb -
i using below code fetch data sql, not getting error code not working on button click
dim strsql string = string.empty strsql = "select * jhg" using connection new sqlconnection (configurationmanager.connectionstrings("xyz").connectionstring) dim command new sqlcommand(strsql, connection) connection.open() reader sqldatareader = command.executereader() while reader.read() gridview1.datasource = reader end while 'end connection , using close
you need databind
gridview after providing datasource:
gridview1.databind();
Comments
Post a Comment