CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 5/9/2006 5:42:34 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 16 Views: 61 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
17 Items, 1 Pages 1 |< << Go >> >|
jayman369
Asp.Net User
How do I link to external site using Menu control?5/9/2006 5:42:34 AM

0/0

I'm using a Menu control for ASP.NET and adding a menuItem for each link to my site's other pages.  Is there a way I can link to external pages like yahoo.com or google.com?  It doesn't work if I set navigateURL = "yahoo.com".  It looks like I can only enter page names in the same directory like page2.aspx or help.html.

Thanks for any help.

-Jay
chunshahab
Asp.Net User
Re: How do I link to external site using Menu control?5/9/2006 12:44:16 PM

0/0

Try this:

<asp:Menu runat="server">

<Items>

<asp:MenuItem NavigateUrl="http://www.yahoo.com" Text="Yahoo" Target="_blank"></asp:MenuItem>

</Items>

</asp:Menu>
Help Whenever You Can
Live Without Regret
jayman369
Asp.Net User
Re: How do I link to external site using Menu control?5/9/2006 1:15:38 PM

0/0

Thank you VERY much.  Adding the http:// did the trick.

-Jay

jayman369
Asp.Net User
Re: How do I link to external site using Menu control?5/10/2006 5:18:39 AM

0/0

Another question.

I now have a Menu set up on the top section of my page, with MenuItems linked to both internatl pages and external sites, but I would like to have those pages load in the same window, leaving the menus alone, so I can navigate using the menu.  Right now, the pages load in the current window and my menus are gone of course.

I know this could be done if all the links are linked to internal pages.  All I would do is set all the internal pages to use a masterpage with the menu in it.  But since some of the links are to external sites like yahoo.com or google.com, masterpages doesn't seem to be the right choice here.

Any suggestions?  Maybe I need to use something like a frame?

Thanks.

-Jay
chunshahab
Asp.Net User
Re: How do I link to external site using Menu control?5/10/2006 1:47:29 PM

0/0

You still can use master page. But need to modify it a little. Try to use frame in your master page and display the content in a different frame from the menu.
Help Whenever You Can
Live Without Regret
jayman369
Asp.Net User
Re: How do I link to external site using Menu control?5/10/2006 2:55:11 PM

0/0

chunshahab:
You still can use master page. But need to modify it a little. Try to use frame in your master page and display the content in a different frame from the menu.

Thanks for the reply.  Do you have any code samle I can look at?

-Jay

chunshahab
Asp.Net User
Re: How do I link to external site using Menu control?5/10/2006 8:19:10 PM

0/0

I am so sorry. I was not thinking.  I think Master Page does not support frame.

I will see if there is other way that we can do this.

So sorry for the mis-info.


Help Whenever You Can
Live Without Regret
jayman369
Asp.Net User
Re: How do I link to external site using Menu control?5/11/2006 3:31:16 AM

0/0

Not a problem at all.  I'll wait 4 any extra info.  thx.  =)
chunshahab
Asp.Net User
Re: How do I link to external site using Menu control?5/11/2006 2:28:05 PM

0/0

Although we cannot use frameset/frames in the MasterPage, we still canuse iFrame (inline frame. Thanks ScottGu).

I don't know whether this will work for you. It is kind of missing of point of using MasterPage. Anyway, I present to you.

1> Here the MasterPage (Sample.master), it contains the Menu, the Iframe and the contentplaceholder. I set frameborder to "no".

<form id="form1" runat="server">

<asp:Menu ID="MainMenu" runat="server" Orientation="Horizontal">

<Items>

<asp:MenuItem NavigateUrl="~/default.aspx" Text="Home" Target="mycontent"></asp:MenuItem>

<asp:MenuItem Text="Sites">

<asp:MenuItem NavigateUrl="http://www.yahoo.com" Text="Yahoo" Target="mycontent"></asp:MenuItem>

<asp:MenuItem NavigateUrl="http://www.google.com" Text="Google" Target="mycontent"></asp:MenuItem>

</asp:MenuItem>

</Items>

</asp:Menu>

<iframe id="Iframe1" name="mycontent" width="100%" height="90%" runat="server" frameborder="no">

</iframe><br />

<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">

</asp:contentplaceholder>

</form>

2> here the default.aspx: it does NOT use the master page. Just a simple plain aspx page

<form id="form1" runat="server">

<table border="0">

<tr>

<td>Last Name:</td>

<td>

<asp:TextBox ID="txtLastName" runat="server" />

<asp:RequiredFieldValidator ID="rfvLastName" runat="server" ControlToValidate="txtLastName" CssClass="Error" Display="Dynamic" ErrorMessage="Last Name Required" />

</td>

</tr>

<tr>

<td>First Name:</td>

<td>

<asp:TextBox ID="txtFirstName" runat="server" />

<asp:RequiredFieldValidator ID="rfvFirstName" runat="server" ControlToValidate="txtFirstName" Display="Dynamic" ErrorMessage="First Name Required" />

</td>

</tr>

</table>

3> Then you will have a start page, which DOES use the masterpage and contains nothing else.

<%

@ Page Language="C#" MasterPageFile="~/Sample.master" AutoEventWireup="true" CodeFile="frames.aspx.cs" Inherits="frames" Title="Untitled Page" %>

<

asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

</

asp:Content>

 

Fire up the start page, you will have the menu at the top. Click on Home, the default page is show, click on Yahoo, the Yahoo page is displayed.

That is just a preliminary example. You definitely need to twist it more to work nicely for you.

Good luck

 


Help Whenever You Can
Live Without Regret
jayman369
Asp.Net User
Re: How do I link to external site using Menu control?5/11/2006 8:14:54 PM

0/0

Thanks for the reply.

Every time I use target=mycontent, instead of loading the page in the iframe, it's loading it a new I.E. window. 

Thanks.

chunshahab
Asp.Net User
Re: How do I link to external site using Menu control?5/11/2006 8:37:07 PM

0/0

Did you copy the code I posted? Did you have your iframe named as mycontent?

Normally if it cannot find the target, it opens in a new window.


Help Whenever You Can
Live Without Regret
jayman369
Asp.Net User
Re: How do I link to external site using Menu control?5/11/2006 8:47:39 PM

0/0

I used target=mainFrame since my iFrame was named mainFrame.

Thanks for the quick reply.

chunshahab
Asp.Net User
Re: How do I link to external site using Menu control?5/11/2006 9:03:20 PM

0/0

Do you have the target for both in the internal and external links?

Do you want to post your code so I can take a look?


Help Whenever You Can
Live Without Regret
jayman369
Asp.Net User
Re: How do I link to external site using Menu control?5/12/2006 3:29:44 AM

0/0


========================================================= I have a default page that uses the Master Page so I can click on the Menu. Thanks.
jayman369
Asp.Net User
Re: How do I link to external site using Menu control?5/12/2006 3:30:03 AM

0/0

        <asp:Menu ID="NavigationMenu" runat="server" BackColor="#B5C7DE" DynamicHorizontalOffset="2"
            Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284E98" Orientation="Horizontal"
            StaticSubMenuIndent="10px">
            <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
            <DynamicHoverStyle BackColor="#284E98" ForeColor="White" />
            <DynamicMenuStyle BackColor="#B5C7DE" />
            <StaticSelectedStyle BackColor="#507CD1" />
            <DynamicSelectedStyle BackColor="#507CD1" />
            <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
            <Items>
                <asp:MenuItem NavigateUrl="http://yahoo.com" Text="YAHOO" Value="YAHOO" Target="mainFrame" ></asp:MenuItem>
                <asp:MenuItem NavigateUrl="http://google.com" Text="GOOGLE" Value="GOOGLE" Target="mainFrame"></asp:MenuItem>
            </Items>
            <StaticHoverStyle BackColor="#284E98" ForeColor="White" />
        </asp:Menu>
        <br />
        <iframe id="mainFrame" width="100%" height="100%">
            
        </iframe>
        <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
        </asp:contentplaceholder>
chunshahab
Asp.Net User
Re: How do I link to external site using Menu control?5/12/2006 1:27:34 PM

0/0

You need to give the "name" attribute for the iframe. That is what the target is looking for. Not the "id".

 <iframe id="mainFrame" name="mainFrame" width="100%" height="100%"></iframe>

 


Help Whenever You Can
Live Without Regret
jayman369
Asp.Net User
Re: How do I link to external site using Menu control?5/12/2006 2:55:59 PM

0/0

Oops my bad.  I got it, and it worked.  Thanks a lot.

=)

17 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Special Edition Using Microsoft Office 2003 Authors: Ed Bott, Woody Leonhard, Pages: 1324, Published: 2004
Special Edition Using Microsoft Office FrontPage 2003: Special Edition Authors: Jim Cheshire, Paul Colligan, Pages: 1080, Published: 2003
Sams Teach Yourself Dreamweaver UltraDev 4 in 21 Days Authors: John Ray, Pages: 767, Published: 2000
Communicating Science Effectively: A Practical Handbook for Integrating Visual Elements Authors: J. E. Thomas, T. A. Saxby, T. J. B. Carruthers, E. G. Abal, Pages: 132, Published: 2006
Dreamweaver 8: The Missing Manual Authors: David Sawyer McFarland, David Pogue, Pages: 936, Published: 2006
Building Online Communities with Drupal, PhpBB, and WordPress Authors: Robert T. Douglass, Mike Little, Jared W. Smith, Pages: 530, Published: 2006
Dreamweaver MX 2004: The Missing Manual Authors: David Sawyer McFarland, David Pogue, Pages: 836, Published: 2004
Microsoft Office 2007 Business Intelligence: Reporting, Analysis, and Measurement from the Desktop Authors: Doug Harts, Pages: 444, Published: 2007
Special Edition Using Macromedia Studio MX 2004: The Only Macromedia Studio MX Book You Need. Authors: Michael Hurwicz, Pages: 1052, Published: 2004
Professional Community Server Authors: Wyatt Preul, Keyvan Nayyeri, Jose Lema, Jim Martin, Pages: 311, Published: 2007

Web:
Adding Visual Studio 2008 Menu Control to A Website by stable121 ... Mar 22, 2008 ... Using a Asp.Net User Control in our program. So... Using a Asp.Net User Control in our ... Adding a Menu Link To An External Item in Jooml. ...
JoeAudette.com - Using an External Link in a Custom Site Map Provider I wanted to be able to link to an external site from my menu but it was raising an error in ... event of the Menu Control by doing your own role checking. ...
how do I link to an external web site (url) from my Blackboard ... After you've copied the web site url, then access the course control panel, ... the course menu (bottom left of the screen), and click on add external link. ...
- David Yack's Blog! - Adding Target to ASP.NET Menu Control Nov 19, 2008 ... NET menu control doesn’t support setting a Target on a menu item. ... Link an External Response. Have a response on your own site? ...
Managing Content - Course Management Support - NU Confluence How do I add an External Link? How do I link an eBook to my course site? .... Go to the Control Panel; Go to Manage Course Menu; Click a corresponding ...
NoNumber! | Joomla! Extensions Directory | CustoMenu ...major menu ... major menu control for Joomla! module CustoMenu is an extremely powerful menu module. ... But for many sites a 1-level (main) menu is just what is desired. ...
Chapter 8: Easy Site Navigation As mentioned, using static data with a Menu or TreeView control is just one way to create a site-navigation menu. The other is to store all the ...
NextClient.com - Support Center Log into your site's control panel. Go to "Manage Pages." Highlight "Home" if you want to create an external link from your main menu items or highlight one ...
Sharp Aquos LC-45GD4U LCD TV Operation Manual » Gadgets Manual LINK) Useful adjustment settings Image position (AV input mode only) Moving the picture on the screen Connecting external speakers Audio Quality Control ...

Videos:
Light Alloy 4.1 (Universal media Player) Cracked Light Alloy is a small and powerful alternative to Windows Media Player. Play AVI, DIVX, DVD, MP3, ASF, WAV and other multimedia formats with ...
Powered by YouTube - Design Your Own YouTube Player Speaker: Geoff Stearns The YouTube player APIs allow you to take nearly full control over the YouTube embedded video players. Controls like ...




Search This Site:










home sitemap missing..please help

does multiview support client side view switch?

how to add seperators in horizontal menu control?

sitemap.sitemapresolve and treeview

masterpage's postback event not firing for a single page...

asp.net dynamic dropdown menu

design view when using master pages

tree view nodes text only

question:master page + sitemap

nesting mapsite providers, and logout implimentation

help ? masterpage changes ....or wrong all along ?

do u know this error??

masterpages rules?

existence of skins

event execution order

content place holder with visual studios

going nutz trying to display dataset data in a treeview... help?

how to send a variable to an ascx that resides inside a master page ??

nested masterpage

must master pages be built using server controls?

image rollovers

reference a lable from masterpage

easy question

any tool to build skins

resize content place holder

treeview: treenode.valuepath - does this string have a hidden character?

can't find user control

can an <asp:contentplaceholder> be variable?

horizontal submenu in asp.net 2.0

interact with masterpage code from content page.

  Privacy | Contact Us
All Times Are GMT