How to Add the BindingManager to the tool box in asp.net
modified on Friday, June 12, 2009 7:21 AM
How to Add the BindingManager to the tool box in asp.net
modified on Friday, June 12, 2009 7:21 AM
Protected Sub btStart_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btStart.Click Session("NoOfRecords") = 0 Try sqlConn.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("Constr") With sqlComm .Connection = sqlConn .CommandText = "OLE_InsertExamDetails" .CommandType = CommandType.StoredProcedure .Parameters.Add("@RollNumber", SqlDbType.Char, 100).Value = Trim(txtrollnumber.Text) .Parameters.Add("@ExamDate", SqlDbType.DateTime).Value = "02-02-2009" .Parameters.Add("@SemesterName", SqlDbType.Char, 20).Value = "One" .Parameters.Add("@Papertype", SqlDbType.Char, 20).Value = RadioButtonList1.SelectedItem.Text End With sqlDataAdap.SelectCommand = sqlComm sqlConn.Open() sqlDataset = New DataSet sqlDataAdap.Fill(sqlDataset) Catch ex As Exception lblmessage.text ="Error in inserting" End Try sqlConn.Close() MsgBox(sqlDataset.Tables.Count) MsgBox(sqlDataset.Tables(0).Rows.Count) End Sub it displays number of tables and corresponding records but when i click on another command button ] for number of tables it displays 0 and for number of rows it generates error cannot find table 0
Protected Sub btStart_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btStart.Click Session("NoOfRecords") = 0 Try sqlConn.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("Constr") 'sqlConn.Open() With sqlComm .Connection = sqlConn .CommandText = "OLE_InsertExamDetails" .CommandType = CommandType.StoredProcedure .Parameters.Add("@RollNumber", SqlDbType.Char, 100).Value = Trim(txtrollnumber.Text) .Parameters.Add("@ExamDate", SqlDbType.DateTime).Value = "02-02-2009" .Parameters.Add("@SemesterName", SqlDbType.Char, 20).Value = "One" .Parameters.Add("@Papertype", SqlDbType.Char, 20).Value = RadioButtonList1.SelectedItem.Text End With sqlDataAdap.SelectCommand = sqlComm sqlConn.Open() 'sqlReader = sqlComm.ExecuteReader 'If sqlReader.Read Then ' While sqlReader.Read ' Response.Write("<br>") ' Response.Write(sqlReader(0)) ' End While 'End If sqlDataset = New DataSet sqlDataAdap.Fill(sqlDataset) Catch ex As Exception lblmessage.text = "Error while inserting" End Try sqlConn.Close() 'MsgBox(dt1.Rows.Count) MsgBox(sqlDataset.Tables.Count) MsgBox(sqlDataset.Tables(0).Rows.Count) ' FillDataSet(sqlDataset) 'display() End Sub this click event shows one table and no of records in the table but when i click on another command button on same aspx page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click ' MsgBox(dt1.TableName) MsgBox(sqlDataset.Tables.Count) MsgBox(sqlDataset.Tables(0).Rows.Count) End Sub this it returns 0 and error cannot find table 0
Protected Sub btStart_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btStart.Click Session("NoOfRecords") = 0 Try sqlConn.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("Constr") 'sqlConn.Open() With sqlComm .Connection = sqlConn .CommandText = "OLE_InsertExamDetails" .CommandType = CommandType.StoredProcedure .Parameters.Add("@RollNumber", SqlDbType.Char, 100).Value = Trim(txtrollnumber.Text) .Parameters.Add("@ExamDate", SqlDbType.DateTime).Value = "02-02-2009" .Parameters.Add("@SemesterName", SqlDbType.Char, 20).Value = "One" .Parameters.Add("@Papertype", SqlDbType.Char, 20).Value = RadioButtonList1.SelectedItem.Text End With sqlDataAdap.SelectCommand = sqlComm sqlConn.Open() 'sqlReader = sqlComm.ExecuteReader 'If sqlReader.Read Then ' While sqlReader.Read ' Response.Write("<br>") ' Response.Write(sqlReader(0)) ' End While 'End If sqlDataset = New DataSet sqlDataAdap.Fill(sqlDataset) Catch ex As Exception lblmessage.text = "Error while inserting" End Try sqlConn.Close() 'MsgBox(dt1.Rows.Count) MsgBox(sqlDataset.Tables.Count) MsgBox(sqlDataset.Tables(0).Rows.Count) ' FillDataSet(sqlDataset) 'display() End Sub this click event shows one table and no of records in the table but when i click on another command button on same aspx page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click ' MsgBox(dt1.TableName) MsgBox(sqlDataset.Tables.Count) MsgBox(sqlDataset.Tables(0).Rows.Count) End Sub this it returns 0 and error cannot find table 0
modified on Monday, June 8, 2009 6:58 AM
Can anybody help me i am developing an online examination system i want to display Questions one by one how i can use move next,move previous,move last,move first
after binding the datagrid If DataGrid1.Items.Count > 0 Then For i = 0 To DataGrid1.Items.Count - 1 if UCase(DataGrid1.Items(i).Cells(columnumber).Text) ="1" Then DataGrid1.Items(i).Cells(3).Text="Unknown" elseif UCase(DataGrid1.Items(i).Cells(columnumber).Text) ="2" Then DataGrid1.Items(i).Cells(3).Text="yes" elseif UCase(DataGrid1.Items(i).Cells(columnumber).Text) ="3" Then DataGrid1.Items(i).Cells(3).Text="no" End If Next End If
hi after binding the datagrid run a for loop to change text of datagrid
i want to open a child datagrid in the same web form example i have a datagrid with columns semester , paper for a particular course wht actually i want that when i click on hypertext column of base datagrid a child datagrid with related details to be displayed
modified on Monday, May 18, 2009 7:19 AM
i have two columns in the datagrid and clicking on the button column of the datagrid i want to open second datagrid
no i want to open in the same page
i want to open another datagrid on the click button of first datagrid