Click here to Skip to main content
15,899,026 members
Home / Discussions / C#
   

C#

 
GeneralRe: Thanks ,but let me knoe any wrong in my code Pin
Christian Graus13-Sep-06 21:34
protectorChristian Graus13-Sep-06 21:34 
GeneralThanks Christian Pin
premkamalg14-Sep-06 0:31
premkamalg14-Sep-06 0:31 
QuestionWhat does this mean???? Pin
saud_a_k13-Sep-06 18:42
saud_a_k13-Sep-06 18:42 
AnswerRe: What does this mean???? Pin
Christian Graus13-Sep-06 19:12
protectorChristian Graus13-Sep-06 19:12 
QuestionDot Net Crystal Report Pin
peshawarcoder13-Sep-06 17:58
peshawarcoder13-Sep-06 17:58 
AnswerRe: Dot Net Crystal Report Pin
iqazi14-Sep-06 3:03
iqazi14-Sep-06 3:03 
GeneralRe: Dot Net Crystal Report Pin
peshawarcoder14-Sep-06 19:38
peshawarcoder14-Sep-06 19:38 
QuestionQuestion about grabbing webpage using WebBrowser Control. [modified] Pin
rryyjw13-Sep-06 17:57
rryyjw13-Sep-06 17:57 
Hi All,

I want to load a page using WebBrowser Control (see code below). I try to get the page content through DocumentText property in "DocumentCompleted" event handler, but it seems that the event won't be triggered. The "Navigated" event won't be triggered either. However, the "Navigating" event does.
I used to use HttpWebRequest/HttpWebResponse to grab webpage content, however, the drawback is that I can't get the full loaded page through it. What I mean by this is that maybe some javascript will execute to modify elements on the page after it's loaded, I call this page as full loaded page. I think using WebBrowser Control can overcome this drawback. It's just like a browser, and it'll execute those javascript after loading the page. But I can't make this control work correctly. Could anyone help me? I'm very appreciate.

Thanks
Jie

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace ConsoleApplication1
{
class Program
{
static WebBrowser wb;

[STAThread]
static void Main(string[] args)
{
Go();
}

private static void Go()
{
wb = new WebBrowser();
wb.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(wb_DocumentCompleted);
wb.Navigating +=new WebBrowserNavigatingEventHandler(wb_Navigating);
wb.Navigated += new WebBrowserNavigatedEventHandler(wb_Navigated);
wb.Navigate("http://www.google.com");
Console.ReadLine();
}

static void wb_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
Console.WriteLine("Navigating");
}

static void wb_Navigated(object sender, WebBrowserNavigatedEventArgs e)
{
Console.WriteLine("Navigated");
}

static void wb_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
Console.WriteLine("DocumentCompleted");
Console.WriteLine(wb.DocumentText);
}
}
}




-- modified at 10:06 Thursday 14th September, 2006
QuestionHow do I manipulate certain windows services? Pin
Muhammad Kanji13-Sep-06 14:40
Muhammad Kanji13-Sep-06 14:40 
AnswerRe: How do I manipulate certain windows services? Pin
Andrei Ungureanu13-Sep-06 21:28
Andrei Ungureanu13-Sep-06 21:28 
Questionlist Box Pin
TAREQ F ABUZUHRI13-Sep-06 14:08
TAREQ F ABUZUHRI13-Sep-06 14:08 
AnswerRe: list Box Pin
Nader Elshehabi13-Sep-06 14:17
Nader Elshehabi13-Sep-06 14:17 
GeneralRe: list Box Pin
TAREQ F ABUZUHRI13-Sep-06 14:35
TAREQ F ABUZUHRI13-Sep-06 14:35 
GeneralRe: list Box Pin
Nader Elshehabi13-Sep-06 14:43
Nader Elshehabi13-Sep-06 14:43 
GeneralRe: list Box Pin
TAREQ F ABUZUHRI13-Sep-06 15:05
TAREQ F ABUZUHRI13-Sep-06 15:05 
Answerhi see this link Pin
premkamalg13-Sep-06 19:05
premkamalg13-Sep-06 19:05 
GeneralRe: list Box Pin
mav.northwind14-Sep-06 8:59
mav.northwind14-Sep-06 8:59 
GeneralRe: list Box Pin
TAREQ F ABUZUHRI14-Sep-06 6:03
TAREQ F ABUZUHRI14-Sep-06 6:03 
GeneralRe: list Box Pin
Nader Elshehabi14-Sep-06 9:14
Nader Elshehabi14-Sep-06 9:14 
QuestionPrinting Tiff's Pin
HahnTech13-Sep-06 13:53
HahnTech13-Sep-06 13:53 
AnswerRe: Printing Tiff's Pin
Nader Elshehabi13-Sep-06 14:32
Nader Elshehabi13-Sep-06 14:32 
QuestionModify a Printed File and Resend it to a Printer Pin
Dowfen13-Sep-06 13:52
Dowfen13-Sep-06 13:52 
Questionsetup file Pin
TAREQ F ABUZUHRI13-Sep-06 13:04
TAREQ F ABUZUHRI13-Sep-06 13:04 
AnswerRe: setup file Pin
Christian Graus13-Sep-06 13:10
protectorChristian Graus13-Sep-06 13:10 
AnswerRe: setup file Pin
Nader Elshehabi13-Sep-06 13:35
Nader Elshehabi13-Sep-06 13:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.