Your code won't even compile as you have an equals sign where there should be a plus sign. It's also worth using the proper brackets with this sort of thing to reduce the risk of errors.
The following works fine for me:
String doSomething = "alert('true');";
Response.Write("<Script>if(confirm('Data updated Any more data you add ??')){ " + doSomething + "}else{alert('false');}</Script>");