title: How to change the language in a website (datascrapping) and get the response through asp.net c#
body: <p>How to do i change the website content language programmatically using asp.net c#?</p>
  
  <p><a href="https://www.tnpds.gov.in/" rel="nofollow noreferrer">https://www.tnpds.gov.in/</a>
  <a href="https://i.stack.imgur.com/LiTdU.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <pre><code>        HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://www.tnpds.gov.in");
          request.Method = "POST";
          Dictionary&lt;string, string&gt; postParams = new Dictionary&lt;string, string&gt;();
          postParams.Add("masterForm:languageSelectMenu:", "en");
          request.ContentType = "application/x-www-form-urlencoded";
          request.UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 7.1; Trident/5.0)";
          request.Accept = "/";
  
          HttpWebResponse resp = request.GetResponse() as HttpWebResponse;
  
          if (resp.StatusCode == HttpStatusCode.OK)
          {
              Stream receiveStream = resp.GetResponseStream();
              StreamReader readStream = null;
  
              if (resp.CharacterSet == null)
                  readStream = new StreamReader(receiveStream);
              else
                  readStream = new StreamReader(receiveStream, Encoding.GetEncoding(resp.CharacterSet));
              string data = readStream.ReadToEnd();
              htmlDoc.LoadHtml(data);
              resp.Close();
              readStream.Close();
          }
  </code></pre>