Wednesday, September 12, 2018

I need to use the .NET class WebClient to display a PHP page. I'm having trouble and would appreciate ANY help!

Hi there! To start off, I don't really know C# and .NET but I think what I am trying to do is very simplistic and if I get some instruction/links to resources on how to do this, I can figure this out in no time.

Basically I have a page that is coded in PHP. This page calls up on a database and displays a message conditionally. This is the webpage: https://mainlib.org/alerts/alert.php

I basically just want this message to display as a bar at the top of the screen on this other webpage that I have limited access to. It's hosted on a web server that cannot display PHP. I have been told the following by the developers:

"It would probably be better to embed in site.master some C# code that either calls out directly to the MySQL database or uses the .NET class WebClient to call out to the existing PHP script and then render the necessary HTML if there’s a message to display. They could accomplish that using <% %> notation is site.master to slip in the C# code."

What I don't understand is how to start. I have Visual Studio 2017 and there are so many different types of .NET projects that I'm not sure which I can use as a test environment (since it's not very easy to update the page I need to put this code on. Basically, I need to ask someone else to test it for me.)

I'm very resourceful with learning things on the fly, but without this starting point, I am basically lost. Is there a term for what I am trying to do? Just having the right terminology to google would help me tremendously. I KNOW it's annoying having people asking for "help" when all they want is someone to write code for free, and that's not what I want. I just don't want to spend forever working on something only to discover that I'm using the entirely wrong framework/syntax.

I've tried looking up what they meant by ".NET class WebClient". Is that the same as ASP? Should I use a .NET standard project in VS or ASP.NET Web App? Core Web App? ANY info would be so so appreciated. Thank you!

I need to use the .NET class WebClient to display a PHP page. I'm having trouble and would appreciate ANY help! Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team