Click here to Skip to main content
15,943,335 members

Comments by Dominique Kemedinger (Top 5 by date)

Dominique Kemedinger 22-Aug-12 12:40pm View    
I thought so... I have googled pretty much and did not find a solution... If there is really not much to do then I'll use the source code to manipulate and debug everytime I made changes...

Here a screen shot of what it looks like. If you have ANY sugestion please share.


Screen shot
Dominique Kemedinger 21-Jul-12 21:48pm View    
Believe it or not, you already answered my questions with your Questions :) !!!
Thank's.
Dominique Kemedinger 21-Jul-12 18:28pm View    
I understand now, I have something like this on another project::
cmd.CommandText = "paInsertarAdmision"; my SP <----
cmd.CommandType = CommandType.StoredProcedure;

That's saver I guess, so I can pass the selected row in the grid view like this???

cmd.Parameters.AddWithValue("@Nombre",grvAprobarestudiantes.SelectedRow.Cells[1].Text ); <---

I really apreciate your help! And I will def look into the SQL injection attack's.
Dominique Kemedinger 21-Jul-12 18:13pm View    
This is not for sale or anything, Im a student therefore a beginner in this.
I just need the selected row in the gridview being inserted into another table.
How Can I do it "securely as you mention it?
Dominique Kemedinger 21-Jul-12 17:57pm View    
What do you mean 'should be LINQ' ?
Answer: I would like to make it work in LinQ. It could also be sql. either way is good.

Where does your data come from ?
My data comes from SQL server, I have several Stored procedures for inserting and so On.

Does this mean that you have to do a postback when someone checks the box ?
Yes, cause once it's checked it should insert it to another table in databas. I have already figured out how to do it.::::

protected void grvAprobarestudiantes_SelectedIndexChanged(object sender, EventArgs e)
{
string query = "insert into Aprobacione Values('" + grvAprobarestudiantes.SelectedRow.Cells[1].Text + "','" + grvAprobarestudiantes.SelectedRow.Cells[2].Text + "','" + grvAprobarestudiantes.SelectedRow.Cells[3].Text + "','" +
grvAprobarestudiantes.SelectedRow.Cells[4].Text + "','" + grvAprobarestudiantes.SelectedRow.Cells[5].Text + "')";
string constr = "Data Source=SAIBABA-PC;Initial Catalog=Adeuca;Integrated Security=True";

SqlConnection connection = new SqlConnection(constr);

connection.Open();
SqlCommand com = new SqlCommand(query, connection);

com.ExecuteNonQuery();
connection.Close();
}

I need it also for a checkbox