I am trying to attach a SSRS report in a prepopulated email and send it. In order to do this, am trying to mimic a JS function which creates a new email with the PDF button attached on click.
What is thr equivalent of the following JS code in C#?
var reEntReq = new XMLHttpRequest();
reEntReq.open("POST", pth, false);
reEntReq.setRequestHeader("Accept", "*/*");
reEntReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
reEntReq.send(query);
//These variables captures the response and returns the response in an array.
var x = reEntReq.responseText.lastIndexOf("ReportSession=");
var y = reEntReq.responseText.lastIndexOf("ControlID=");
var ret = new Array();
ret[0] = reEntReq.responseText.substr(x + 14, 24);
ret[1] = reEntReq.responseText.substr(x + 10, 32);