Saturday, October 18, 2014

how to use grid view in

Posted by Gnani Palepu  |  No comments

 if you want more related search please click here  
 please help to other  

 Read text box values and display in to the gridview with out using the database connectio using  
 Imports System.Collections.Generic  
 Imports System.Linq  
 Imports System.Web  
 Imports System.Web.UI  
 Imports System.Web.UI.WebControls  
 Imports System.Data  
 Partial Class _Default  
   Inherits System.Web.UI.Page  
   Dim dt As DataTable  
   Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load  
     dt = New DataTable()             ' here we are creation the table  
     Dim dc1 As New DataColumn("NAME")      ' here we are declaring the column name  
     Dim dc2 As New DataColumn("ADDRESS")              ''  
     dt.Columns.Add(dc1)             'here we are assiging the cloumn names to datatable(dt)  
   End Sub  
   Protected Sub Btnshow_Click(sender As Object, e As System.EventArgs) Handles Btnshow.Click  
     Dim dr1 As DataRow = dt.NewRow()        'here we are adding new row with two coloums in datatable  
     dr1(0) = txt1.Text  
     dr1(1) = Txt2.Text  
   End Sub  
   Public Sub binddata()  
     GridView1.DataSource = dt  
   End Sub  
 End Class  

 if you want more related search please click here  
 please help to other  

11:34 PM Share:


Get updates in your email box
Complete the form below, and we'll send you the best coupons.

Deliver via FeedBurner
Proudly Powered by Blogger.
back to top