Saturday 1 September 2012

asp.net display code with c# | try-catch-finally in asp.net

In this article i have shown to display value in to database using c# using gridview

           try
            {
               con.Open();
               string query = "select * from feesentry_tb";
               SqlCommand cmd = new SqlCommand(query, con);
               SqlDataAdapter da = new SqlDataAdapter(cmd);
               DataTable dt = new DataTable();
               da.Fill(dt);
               grdvw.DataSource = dt;
               grdvw.DataBind();
              
            }
            catch (Exception ex)
            {
                Response.Write(ex);
            }
            finally
            {
                con.Close();
            }
      
Share This
Previous Post
Next Post

FYJC XI standard online admisson Process and declaraton of Merit list . Cut off List For prevous year also . 10 Th Results onlne declaraton Maharashtra Region .

0 comments: