samedi 23 février 2019

.NET MVC Web Bot

  [HttpPost]
    public ActionResult Index(string sehir)
    {
        string html;
        Uri URL;
        string xPath = "/html/body/table/tbody/tr[2]/td/table/tbody/tr/td[2]/table/tbody/tr/td/table[2]/tbody/tr[1]/td[2]/table/tbody/tr/td[2]/table[1]/tbody/tr[2]/td[2]";
        string url = "http://195.216.232.22/product_price.asp?cityID=" + sehir;
        URL = new Uri(url);
        WebClient client = new WebClient();
        client.Encoding = Encoding.UTF8;
        html = client.DownloadString(URL);
        HtmlDocument doc = new HtmlDocument();
        doc.LoadHtml(html);
        var deneme = doc.DocumentNode.SelectSingleNode(xPath).InnerText;
        TempData["deneme"] = deneme;


        return View();
    }

deneme is coming null. HtmlAgilityPack.HtmlNode.SelectSingleNode(...), null exception




Issue while deploying.Net core web api in remote machine iis server

I created a Web API in .Net Core 2.0 and it is working fine locally and I tested using postman, and able to publish the code successfully as well. Once I put that published code in my remote server IIS(Version 10) and While enabling the Directory Browsing in IIS 10 Ienter code here am getting below error

The Error is

Image of the error

Webconfig Image

Please, someone, help me to solve this issue.




Web page isn't getting responsive

I want to make my web page responsive. It works till 320px, but when I reduce the size of the screen furthermore, it doesn't work at all, and only half of the content gets visible.

Here's the required code

HTML:

          <div class="col-md-6"><img src="assets/img/profile.png" height="520" width="500" hspace="20"  class="responsive" >  
          </div> 
          <div class="col-md-6"> 
             <p>Lorem Khaled Ipsum is a major key to success. To succeed you must believe. When you believe, you will succeed. Mogul talk. Find peace, life is like a water fall, you’ve gotta flow. Lion! Fan luv. Eliptical talk. </p> 
             </div>  

    </div>

CSS:

.responsive {
max-width: 100%; 
display:block; 
height: auto;
margin: auto; 
 } 

img {
  float: left;
   margin-left: 20px; 
 }

    @media screen and (max-width: 768px) { 
.nav-menu {
    background-color: #ffffff; 
}

.nav-toggle:hover {
    background-color: transparent;
}

.nav-toggle span {
    background-color: #dfdfdf;
}

.nav-toggle span:hover {
    background-color: #fff;
}


   } 

Thanks in advance!




Angular and Angular Dart (and Flutter)

I've been thinking about using Angular Dart, right now I'm using Angular and TypeScript and it's a really good framework, but I tried Flutter and I absolutely loved it, it was perfect, the widgets, the language, everything just just worked perfectly together. So I saw that I can use Angular with Dart, it had a great documentation, includes material design, so I started to look into it and I barely found anything about it, sure it has pub with all the packages, but most of them are for Flutter, I noticed I can only use choco with cmd in admin mode to run the webdev serve and some other flaws that didn't really like, and also the community seems dead. In december Flutter announced that they are working on Hummingbird (Flutter for the web) and they are going cross-platform, and I can't wait to see what they will come up with, and I want to start moving towards Flutter, but I have new projects, so I can't wait for Hummingbird right now, now I have to decide if we're going to use Angular, or Angular Dart. What are your opinions on this matter? What would you choose right now?




Is there a way to display the captcha from a site to another and transfer back the input?

I need to make a site that display a captcha given by this site: https://www.google.com/recaptcha/api2/demo and then the user answers the captcha on my site and the result is transferred to the original site. How should I go about this? Thanks




Is it possible to integrate or use information of some other web application on your website ? on Real Time?

According to my title, Is it possible to integrate or use information of some other web application on your website ? on Real Time?

For Example#1: I have a Facebook page and I post daily. Is it possible that I integrate it to my website? Not my whole Facebook page but only post part (post component). Means view that part of a Facebook page on my website. Or can I use that Facebook post DATA on my website.

Example#2: If example#1 is not possible? So I'm keeping it more simple that can we use DATA of some other web application on our website? Means If it is updated on that web application so automatic it should updated on our website also (on Real time).

How it can be done through API? If that web application is providing? what if not providing? Or any other solution?




How to fix left and right sidebar and remains centre main content scrollable upside?

Hi I am stuck at a point.

Please tell me

How to I fixed my left and right sidebar and only leave main content scrollable.

(Please don't use bootstrap anywhere because I didn't use it in my project.)

Please use reference image of PDF file attached because I have better explained with images that actual I want.

Reference JPG View / Download here

Reference JPG View / Download here

Reference PDF View / Download here

Reference PPTX View / Download here

Please let me know if something not cleared. You can also take example of Facebook