This is a migrated thread and some comments may be shown as answers.

Menu- Open in new window/tab

1 Answer 240 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Neelima
Top achievements
Rank 1
Neelima asked on 16 Mar 2011, 06:21 PM
I'm using the same page for Adding and editing clients. When I right click on any menu item(Edit Client or Add Client) and  open in a new window/tab, it always opens the page that is in current window/tab.
 In the Radmenu Click event handler, I have the below code.

   Public Shared rqstType As String
  
Protected Sub RadMenu1_ItemClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadMenuEventArgs) Handles RadMenu1.ItemClick
  
        If RadMenu1.SelectedValue = "Add New Clients" Then
                        rqstType = "Add"
            Response.Redirect("frm_Client.aspx")
  
        ElseIf RadMenu1.SelectedValue = "Edit Existing Clients" Then
                rqstType = "Edit"
            Response.Redirect("frm_Client.aspx")
        End If
    End Sub


Thank you
Neelima


1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 17 Mar 2011, 06:35 AM
Hello Nelima,

As far as I know it is "not possible" to redirect into a new window, because a redirect on the server causes a special HTTP response to be sent to the users browser, the client. The browsers native implementation interprets the special response code and sends the user off to the destination. There's no built-in mechanism or standard for specifying a new window.

One approach is to use the  RadWindow for opening the desired page. You can follow the following approach to open the window from code-behind.
Calling radalert from codebehind

Another approach is to handle the same in the client event OnClientItemClicked. Attach OnClientItemClicked to RadMenu and use client code for opening window in the event handler.
The Telerik online documentation shows how to open window from client side.


Thanks,
Shinu.
Tags
Menu
Asked by
Neelima
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or