| | |
Any Simple Code for binding data with gridview?
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Aug 2008
Posts: 59
Reputation:
Solved Threads: 2
0
#2 Nov 3rd, 2009
Try this:
define the variables globally if u want to use them more thn once.
ASP.NET Syntax (Toggle Plain Text)
SqlConnection cn = new SqlConnection("Your ConnectionsString here"); SqlCommand cmd = new SqlCommand("Query to Retrieve data from database",cn); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds, "Data"); gridview.DataSource = ds.Tables[0]; gridview.DataBind();
define the variables globally if u want to use them more thn once.
![]() |
Similar Threads
- unable to display data in GridView control from datasource (ASP.NET)
- General Question about GridView framework 3.5 (ASP.NET)
- Getting error for the simple code Please help me out (VB.NET)
- Simple code help (Python)
- pls help in this code in storing a data (PHP)
- Simple login (read data through txt file) (Visual Basic 4 / 5 / 6)
- source code to insert data into database using javabean (Java)
- simple code (C++)
- CAn anyone provide me a very simple code for shopping cart? (PHP)
Other Threads in the ASP.NET Forum
- Previous Thread: Custom Validation Check Duplicate Data
- Next Thread: redirecting back to referrer page in asp.net
| Thread Tools | Search this Thread |
.net 2.0 activexcontrol ajax alltypeofvideos appliances application asp asp.net bc30451 beginner bottomasp.net box browser button c# cac checkbox commonfunctions control dataaccesslayer database datagridview datagridviewcheckbox datalist deployment development dgv dialog dropdownlist dynamic dynamically edit embeddingactivexcontrol expose feedback fileuploader fill findcontrol flash form formatdecimal formview google gridview gudi iis image javascript listbox login microsoft mobile mouse mssql news novell numerical opera panelmasterpagebuttoncontrols parent radio redirect registration relationaldatabases reportemail save schoolproject search security select sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video videos view vista visualstudio web webapplications webdevelopemnt webdevelopment webprogramming webservice xsl youareanotmemberofthedebuggerusers





