The Below query is concate in c#
When a long query we write we impliments this
Solution
-----------
protected void Button1_Click(object sender, EventArgs e)
{
string Name = "Pabitra";
// string Query = "insert into tblEmployee ( id, name ) values( " + 4 + ",'" + Name + "' )";
string Query = "insert into tblEmployee " +
" ( " +
" id, " +
" name " +
" ) " +
" values( " +
"" + 4 + "," +
"'" + Name + "' " +
" )";
Response.Write(Query);
}
When a long query we write we impliments this
Solution
-----------
protected void Button1_Click(object sender, EventArgs e)
{
string Name = "Pabitra";
// string Query = "insert into tblEmployee ( id, name ) values( " + 4 + ",'" + Name + "' )";
string Query = "insert into tblEmployee " +
" ( " +
" id, " +
" name " +
" ) " +
" values( " +
"" + 4 + "," +
"'" + Name + "' " +
" )";
Response.Write(Query);
}