tags:

views:

14

answers:

1

Hi,

I try to get the string after the sign # in my url of my WebBrowser with:

MessageBox.Show(UI_WebBrowser.Source.Fragment);

But it return me a null string! I also tried to navigate to a string like "http://www.google.com/#123" and nothing...

Need help please! :)

PS: my code:

    private void checkIfUpdate()
    {
        UI_WebBrowser.Navigated += new System.Windows.Navigation.NavigatedEventHandler(UI_WebBrowser_Navigated);
        UI_WebBrowser.Navigate("http://www.google.com/#123");
    }

    void UI_WebBrowser_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
    {
        MessageBox.Show(UI_WebBrowser.Source.Fragment);
    }
A: 

Is it possible that the fragment property requires that there is a string between the path and the #?

Try changing http://www.google.com/#123 to http://www.google.com/ig#123

davisoa
Okay, like that it's work! But, in my code, I have a URL that's redirect to an another and it's doesn't work :-/
Kevinrob