No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
2 Posted Topics
Re: [QUOTE=sebastian3;678190]Please let me know how i can insert datagrid values to datatable.[/QUOTE] try the below example and ensure u create a empmaster table in the database master [code] private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here SqlConnection sql=new SqlConnection("server=.;database=master;uid=sa;pwd=sa;"); SqlCommand sqlcmd=new SqlCommand("select … | |
Re: Try placing the page load code inside the if condition as below: [code] If Not (IsPostBack) Then TheSQL = New SqlCommand("Select CatID, CatName from RSG_Category order by CatName", objConn) TheResults = TheSql.ExecuteReader CatID.DataValueField = "CatID" CatID.DataTextField = "CatName" CatID.DataSource=TheResults CatID.DataBind() TheSQL.dispose() TheResults.dispose() objConn.close() End If [/code] |
The End.