protected void lbQwID_Click(object sender, EventArgs e)
{
try
{
string fileUrl = UpFilesUrl;
string fileName = lbQwID.Text;
NetworkCredential nwc = new NetworkCredential(strWSName, strWSPWD, strWSDomain);
this.m_NetworkCredential = nwc;
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(fileUrl + "/" + fileName);
WebHeaderCollection whc = new WebHeaderCollection();
if (fileUrl.Contains("aspx"))
{
whc.Add("Translate", httpWebRequest.Headers.ToString());
}
else
{
whc.Add("Translate", "f");
}
httpWebRequest.Headers = whc;
CredentialCache creCache = new CredentialCache();
creCache.Add(new Uri(fileUrl + "/" + fileName), "NTLM", this.m_NetworkCredential);
httpWebRequest.Credentials = creCache;
HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
fileName = fileName.Replace("aspx", "html");
Stream responseStream = httpWebResponse.GetResponseStream();
long fileLength = httpWebResponse.ContentLength;
string fileName1 = HttpUtility.UrlPathEncode(fileName);
//string fileType = HttpUtility.UrlPathEncode(this.m_FileType);