0

I have developed a web browser in c# using System.Windows.Forms.WebBrowser But it doesn't show "asp:Menu" items at my pages. I've use this code in my asp project:

 <asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
                <Items>
                    <asp:MenuItem NavigateUrl="~/Default.aspx" Text="default"/>
                    <asp:MenuItem NavigateUrl="~/Exit.aspx" Text="exit"/>
                   <asp:MenuItem NavigateUrl="~/Setting.aspx" Text="setting"/>
                </Items>
            </asp:Menu>

also I've used more web browser sources downloaded from codeproject.com like this: http://www.codeproject.com/Articles/60179/Web-Browser-in-C

noseratio
  • 59,932
  • 34
  • 208
  • 486
user1642860
  • 25
  • 1
  • 1
  • 4
  • What does not work: your page or "your" browser? – Rob Aug 22 '13 at 07:58
  • The browser does not show menu Items – user1642860 Aug 22 '13 at 08:01
  • I got that, what I mean: does your browser show other web pages correctly or does your page show up correctly with other browsers? – Rob Aug 22 '13 at 08:03
  • yes, my page is correctly shown by other browsers such as IE, Mozila fireFox and Google Chrome, and my browser shows other pages correctly. reRealy I don't know if the prblem is related to my browser or my asp page. – user1642860 Aug 22 '13 at 13:34

2 Answers2

1

Apparently, your page works in other browsers but not in WebBrowser control. If so, try implementing WebBrowser Feature Control.

[EDITED] Once you've implemented FEATURE_BROWSER_EMULATION, if you want the standard rendering mode with the latest HTML5 features for WebBrowser, the following markup will enable it for your page:

<!doctype html> 
<html>
<head> 
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> 
<!-- cutting edge rendering --> 
</head>
</html>
Community
  • 1
  • 1
noseratio
  • 59,932
  • 34
  • 208
  • 486
0

I think, the problem is on your browser. I try your code, and it shown correctly.

Rudy Setiady
  • 76
  • 1
  • 3