How to fill grid in asp.net through code in function of class Public Function FillGrid() As DataTable Dim cmd As SqlCommand cmd = New SqlCommand("SP_SELECT_COLUMNNAMES", objCn.openDb()) cmd.CommandType = CommandType.StoredProcedure Dim dt As New DataTable("Dt") Dim da As New SqlDataAdapter(cmd) Try cmd.Parameters.Add(New SqlParameter("@COLUMNNAME", SqlDbType.VarChar, 1000, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, _ColumnName)) cmd.Parameters.Add(New SqlParameter("@TABLE", SqlDbType.Char, 300, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, _Table)) cmd.Parameters.Add(New SqlParameter("@CRITERIA", SqlDbType.Char, 2000, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, _Criteria)) 'Execute Query da.Fill(dt) 'da.Fill(dt) Dim Inti As Integer 'For Inti = 0 To dt.Columns.Count - 1 ' '...
ERP Project Management,Asp.net,PL SQL Tips for error resolution,Research,Software Errors and solution,SQL 2014,2012,2008,Procedural language,SP,Power BI,excel macro ,Musical notations,Business software,Degree, diploma related informations.