.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links


Posted By:      Posted Date: April 14, 2011    Points: 0   Category :.NET Framework
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.IO;

namespace photoshops
  public partial class WebForm2 : System.Web.UI.Page
    SqlConnection conn = new SqlConnection();
    protected void Page_Load(object sender, EventArgs e)
       = @"Data Source=DEVI\SQLEXPRESS; Initial Catalog =cat; Integrated Security=SSPI";

      Load_GridData(); // call method below
    void Load_GridData()
      conn.Open(); // open the connection 
      SqlDataAdapter Sqa = new SqlDataAdapter("select * from tblphotosettings", conn);
      DataSet ds = new DataSet();
      Sqa.Fill(ds);  // fill the dataset 
      GridView1.DataSource = ds; // give data to GridView

    protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)

i want display image and customer record but error
Both DataSource and DataSourceID are defined on 'GridView1'. Remove one definition.

View Complete Post

More Related Resource Links

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend