Hi pradeepbg,
I have used your code,it works fine as per your requirement.
HTML
<div>
<script type="text/javascript">
function SetTarget() {
document.forms[0].target = "_blank";
}
</script>
<asp:TextBox ID="TextBoxFadrs" runat="server" />
<br />
<br />
<asp:Button Text="Submit" runat="server" OnClick="Submit" OnClientClick="SetTarget()" />
</div>
Code
protected void Submit(object sender, EventArgs e)
{
string address;
try
{
StringBuilder queryAddress = new StringBuilder();
queryAddress.Append("http://maps.google.com/maps");
if (TextBoxFadrs.Text != string.Empty)
{
address = TextBoxFadrs.Text;
queryAddress.Append("?q=" + address);
}
address = queryAddress.ToString();
Response.Redirect(address, false);
}
catch (Exception ex)
{
//MessageBox.Show(ex.Message.ToString(), "Unable to Retrieve Map");
}
}
I hope this will help you out.