<script language="c#" runat="server">
void Page_Load()
{
SqlConnection objConnection1 = new SqlConnection("server=local;uid=;pwd=;database=web") ;
SqlDataAdapter da = new SqlDataAdapter ("select * from name",objConnection1);
DataSet ds = new DataSet();
da.Fill(ds);
dgrdmain.datasoure = ds;
dgrdmain.databind();
}
</script>
void Page_Load()
{
SqlConnection objConnection1 = new SqlConnection("server=local;uid=;pwd=;database=web") ;
SqlDataAdapter da = new SqlDataAdapter ("select * from name",objConnection1);
DataSet ds = new DataSet();
da.Fill(ds);
dgrdmain.datasoure = ds;
dgrdmain.databind();
}
</script>
飘过~~