CodeVerge.Net Beta


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




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: Date Entered: 11/11/2009 3:14:34 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 0 Views: 9 Favorited: 0 Favorite
6 Items, 1 Pages 1 |< << Go >> >|
"ganesh agrawal
NewsGroup User
Opening page in new window from a master page's child page11/11/2009 3:14:34 PM

0

Hi....

I have a master page in my website. It has a child page which contains a treeview control on it. Every node of the treeview redirects to a new page (Not a master page's child page) Now I just want that when a user selects a node, the requested page should open in new window. Remaining child pages would be shown in the same window.

Thanks

"sayyazahmad" <
NewsGroup User
Re: Opening page in new window from a master page's child page11/11/2009 8:31:18 PM

0

In ItemDataBound of TreeView, add the client side javascript click event, like following...

e.Item.Attribute.Add("OnClick", "javascript:win=window.open('page.aspx');");


 


Please Mark As Answer if it helps you!
"ganesh agrawal
NewsGroup User
Re: Opening page in new window from a master page's child page11/12/2009 9:06:12 AM

0

Thanx for answer bt mytreeview is not databound instead it's hand written nodes. 

"Hong-Gang Chen
NewsGroup User
Re: Opening page in new window from a master page's child page11/16/2009 6:14:25 AM

0

Do you mean that the new opened window in the same wendow with the child page?   If so, why not use iframe?


Hong-Gang Chen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
"ganesh agrawal
NewsGroup User
Re: Opening page in new window from a master page's child page11/18/2009 6:04:36 AM

0

NO, I just want that  page (which is a normal page and not a child page of my master page) should open  in new window by clicking on clicking the  treeview node (It is on a master page's child page).

"Hong-Gang Chen
NewsGroup User
Re: Opening page in new window from a master page's child page11/18/2009 7:33:40 AM

0

Put a iframe inside of a content page(just as you said, the child page, we call it "content page"), and set the target to this iframe, check this demo code,

<%@ Page Title=" " Language="C#" MasterPageFile="~/main.master" %>

<script runat="server">

</script>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="float: left; width: 200px;">
        <asp:TreeView ID="TreeView1" runat="server" Target="iframeDemo">
            <Nodes >
                <asp:TreeNode Text="My Computer">
                    <asp:TreeNode Text="Favorites">
                        <asp:TreeNode Text="News">
                            <asp:TreeNode Text="MSN" NavigateUrl="http://www.msn.com" />
                            <asp:TreeNode Text="MSNBC News" NavigateUrl="http://www.msnbc.msn.com" />
                        </asp:TreeNode>
                    </asp:TreeNode>
                </asp:TreeNode>
            </Nodes>
        </asp:TreeView>
    </div>
    <div style="float: left; width: 1000px;">
        <iframe width="100%" height="800px;" scrolling="no" src="http://www.asp.net" id="iframeDemo" name="iframeDemo">
        </iframe>
    </div>
    <div style="clear: both;">
    </div>
</asp:Content>


 


Hong-Gang Chen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
6 Items, 1 Pages 1 |< << Go >> >|


Free Download:







uk format date parsing

datebinder.eval(container - conditional

checking ssl using .net

use of java script

how to traverse a comma seperated string?

should i declare my varaibles at the top of the method, or can i just declare them as i used them in the code ? standard

asp.net 2.0

how does the "write a new post" section work?

help::open download window

to enable the details of this specific error message to be viewable on remote machines, please create a <customerrors> tag within a "web.config"

testing mails using asp.net

how to distinguish server and client resrc on same developer machine?

txtname.text in texfile to be appended

connecting to a web cam - advice on books

dropdown list

database results

datalist button

vb.net to c# translation

asp.net using c# to display chart / graph

i want to open .ppt fin in browser

works in asp.net web matrix - but not frontpage

portlet 1.0 compliant interface..

is drag & drop a bad practise?

where do i place my events?

webmatrix starter kits

how can i call a page that uses only code or activate code directly from a menu click event ?

dll with xml file

casting error

object reference not set to an instance of an object. why?

how to set timer in asp.net page?

problem uploading file on localhost

asp.net 2.0 sms gateway

how do you use line breaks in your code?

cache clearing

error in browse when trying to text .aspx file

client application services

how to sort a system.collections.generic.list

is there a quick way to add an image folder in visual studio 2003

download blob from database and save it with a specific name?

i want to import more than 50000 registry in my sql server

prevent cache asp .net pages..

calling javascript functions for validating form controls data

create user - failed to save data into database

asp.net 2.0 :references in web site

support info in .net

custom validator for only letters

using ontextchange with form..

sending email with asp.net

.net 1.1 or 2.0 ?

returning variables

   
  Privacy | Contact Us
All Times Are GMT