Hi slb2013,
Here I have created sample that full-fill your requirement.
HTML
<div>
Enter Id Number : <asp:TextBox runat="server" ID="TextNumber"></asp:TextBox>
<asp:Button ID="btnSAS" Text="SAS" runat="server" OnClick="BtnSAS_Click" />
</div>
C#
protected void BtnSAS_Click(object sender, EventArgs e)
{
string IdNumber = TextNumber.Text.Trim();
string UrlA = "https://microsoft-apiapp80ce5187f0b2490aadbc980673a5485d.azurewebsites.net/api/GetBlobs/Blob?blobContainer=12062&blobName=" + IdNumber + ".pdf&passKey=RecorderAz4ass3ey";
string UrlB = ResFromServer(UrlA);
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Key", "NewWindow=window.open('" + UrlB + "','PDFViewer','menubar=0, location=1, toolbars=1, scrollbars= 1, resizable=1, width=750,height=775, top=150, left=220')", true);
}
public string ResFromServer(string url)
{
string location = string.Copy(url);
string responseFromServer = string.Empty;
if (!string.IsNullOrEmpty(location))
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(location);
request.AllowAutoRedirect = false;
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
{
Stream dataStream;
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
responseFromServer = reader.ReadToEnd();
}
}
return responseFromServer;
}
Screenshot