![]() ![]() SqlCommand = New SqlCommand((((( "Insert into StudentRecord (Name,ClassName,RollNo,EmailId,TotalRecord) Values('" + txtName.Text & "','") + txtClassName.Text & "','") + txtRollNo.Text & "','") + txtEmailId.Text & "','") + txtTotalRecord.Text & "')", sqlConnection) Protected Sub Submit_Click1( ByVal sender As Object, ByVal e As EventArgs) Protected Sub GridView1_PageIndexChanging( ByVal sender As Object, ByVal e As GridViewPageEventArgs) Protected Sub GridView1_RowCancelingEdit( ByVal sender As Object, ByVal e As SqlCommand.CommandText = "Delete from StudentRecord where StId='" & lbldeleteID.Text & "'" Protected Sub GridView1_RowDeleting( ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) sqlConnection = New SqlConnection(ConfigurationManager.AppSettings( "connect"))ĭim lbldeleteID As Label = DirectCast(GridView1.Rows(e.RowIndex).FindControl( "lblstId"), Label) Txtclassname.Text & "',RollNo='" & txtrollno.Text & "',EmailId='" & txtemailid.Text & "' where StId='" ![]() SqlCommand.CommandText = "Update StudentRecord set Name='" & txtname.Text & "',ClassName='" & Protected Sub GridView1_RowUpdating( ByVal sender As Object, ByVal e As GridViewUpdateEventArgs)ĭim lblstid As Label = DirectCast(GridView1.Rows(e.RowIndex).FindControl( "lblstId"), Label)ĭim txtname As TextBox = DirectCast(GridView1.Rows(e.RowIndex).FindControl( "txtName"), TextBox)ĭim txtclassname As TextBox = DirectCast(GridView1.Rows(e.RowIndex).FindControl( "txtClassName"), TextBox)ĭim txtrollno As TextBox = DirectCast(GridView1.Rows(e.RowIndex).FindControl( "txtRollNo"), TextBox)ĭim txtemailid As TextBox = DirectCast(GridView1.Rows(e.RowIndex).FindControl( "txtEmailId"), TextBox) Protected Sub GridView1_RowEditing( ByVal sender As Object, ByVal e As GridViewEditEventArgs) SqlDataAdapter = New SqlDataAdapter(sqlCommand) SqlCommand.CommandText = "Select * from StudentRecord" SqlConnection = New SqlConnection(ConfigurationManager.AppSettings( "connect")) Protected Sub GridView1_Load( ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.Load
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |