Hello There, Guest!
View New Posts  |  View Today's Posts
Webclient & NOJS

  • 0 Vote(s) - 0 Average


10-27-2012, 04:47 AM #1
simx
Member
**
Posts: 233 Threads:37 Joined: Jun 2011 Reputation: 4

Webclient & NOJS
Hi Everyone!!

I am trying to create a link shortener with bit.ly but I am trying not to use the API. The reason for this is that I am trying to learn a little bit more about the coding that would go into it.

When I return the source code to get the newly shortened link, it returns pretty much everything except the link.

There is a little bit of code:
<html class="nojs">

Would this be stopping the link from showing?
if so... how would I go about actually getting it to work correctly.

Many thanks in advance.

SimX

10-27-2012, 02:08 PM #2
AceInfinity
Developer
*******
Administrators
Posts: 9,733 Threads:1,026 Joined: Jun 2011 Reputation: 76

RE: Webclient & NOJS
Once you send the webrequest it should just be in your Clipboard.


Microsoft MVP .NET Programming - (2012 - Present)
®Crestron DMC-T Certified Automation Programmer

Development Site: aceinfinity.net

 ▲
 ▲ ▲

10-27-2012, 02:45 PM #3
Louis
Master of the IRCs!
**
Posts: 153 Threads:23 Joined: May 2012 Reputation: 11

RE: Webclient & NOJS
Instead of using bit.ly, why not create a url shortener service yourself? Would probably teach you much more than just using bit.ly or any other service.

10-27-2012, 04:37 PM #4
Epixors
(づ。◕‿‿◕。)づ・。*。✧・゜゜・。
*****
TLF Coders
Posts: 420 Threads:58 Joined: Aug 2012 Reputation: 6

RE: Webclient & NOJS
Wouldn‘t learn him much if you ask me. Some id and link in a database, not much more. Could you give a bit more info simx?

10-27-2012, 07:20 PM #5
Louis
Master of the IRCs!
**
Posts: 153 Threads:23 Joined: May 2012 Reputation: 11

RE: Webclient & NOJS
(10-27-2012, 04:37 PM)Epixors Wrote:  Wouldn‘t learn him much if you ask me. Some id and link in a database, not much more. Could you give a bit more info simx?
Of course it could teach him a lot... he could add all kinds of features. Site verification, check for phishing sites, generate screenshots, usage statistics... Many things. Not just about putting an ID into a database. This is something I made just for the heck of it http://thepb.in/!jwbN0L/preview/ -- I could add many more features if I wanted.
This post was last modified: 10-27-2012, 07:20 PM by Louis.

10-27-2012, 07:51 PM #6
AceInfinity
Developer
*******
Administrators
Posts: 9,733 Threads:1,026 Joined: Jun 2011 Reputation: 76

RE: Webclient & NOJS
(10-27-2012, 07:20 PM)Louis Wrote:  
(10-27-2012, 04:37 PM)Epixors Wrote:  Wouldn‘t learn him much if you ask me. Some id and link in a database, not much more. Could you give a bit more info simx?
Of course it could teach him a lot... he could add all kinds of features. Site verification, check for phishing sites, generate screenshots, usage statistics... Many things. Not just about putting an ID into a database. This is something I made just for the heck of it http://thepb.in/!jwbN0L/preview/ -- I could add many more features if I wanted.

This is true, but perhaps not with the .NET Framework and more on the PHP language side of things (or JavaScript). Unless he was to make it an ASP.net web application.


Microsoft MVP .NET Programming - (2012 - Present)
®Crestron DMC-T Certified Automation Programmer

Development Site: aceinfinity.net

 ▲
 ▲ ▲

10-28-2012, 02:02 AM #7
simx
Member
**
Posts: 233 Threads:37 Joined: Jun 2011 Reputation: 4

RE: Webclient & NOJS
Hi guys,

Thanks for all your replys, I am not really highly versed in php or asp.NET.

I did actually manage to get this done, but it I was having to use the Webbrowser control.

From reading around the net, am I correct in saying that a webclient does not support Javascript and that this may be why I am not able to see all the source code?

SimX

10-28-2012, 02:34 PM #8
simx
Member
**
Posts: 233 Threads:37 Joined: Jun 2011 Reputation: 4

RE: Webclient & NOJS
Ok, reading a little bit more into it, it seems I need a headless browser, would you guys have one that you would be willing to recommend?

SimX

10-29-2012, 12:12 AM #9
kerplunk
Legen.. *wait for it* ..dary!
***
Posts: 259 Threads:55 Joined: Dec 2011 Reputation: 1

RE: Webclient & NOJS
You could just create the browser object without showing,

Like so:
Code:
var Browser = new WebBrowser();
Browser.Navigate("http://www.google.com");

Using this, the browser navigates to google without actually showing any gui.

10-29-2012, 01:03 AM #10
simx
Member
**
Posts: 233 Threads:37 Joined: Jun 2011 Reputation: 4

RE: Webclient & NOJS
Thanks for the reply kerplunk but I have already been able to do it via a webbrowser.

I am trying to complete it via a webclient or something similar.

SimX




Forum Jump:


Possibly Related Threads...
Thread Author Replies Views Last Post
   Webclient Button Clicking simx 9 7,066 09-11-2012, 06:57 PM
Last Post: AceInfinity
   Webclient or httpwebrequest ?? simx 4 4,221 03-26-2012, 05:17 PM
Last Post: AceInfinity
   WebClient Header Codes, A Better Way? Lee Stevens 6 4,100 03-15-2012, 07:52 PM
Last Post: Lee Stevens


Users browsing this thread: 1 Guest(s)