This is your original query:
Code:
var sql="insert into smpl(name,family) values('"+n+"','"+f+"')";
Response.Write(sql);
con.Execute(sql);
rs.Open("select * from smpl where name='محمد مهدي' ",con);
It should look like this:
Code:
var sql="insert into smpl(name,family) values(N'"+n+"', N'"+f+"')";
Response.Write(sql);
con.Execute(sql);
rs.Open("select * from smpl where name=N'محمد مهدي' ",con);
The N prefix sets the field to accept unicode, instead of the local character set of the remote machine.