Can't get Fragment information from a System.Windows.Control.WebBrowser
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 sen开发者_运维知识库der, System.Windows.Navigation.NavigationEventArgs e)
{
MessageBox.Show(UI_WebBrowser.Source.Fragment);
}
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
精彩评论