cancel
Showing results for 
Search instead for 
Did you mean: 

Response.Redirect()

Former Member
0 Kudos

Hello!

I have an application, programmed in asp.net. Now i want to integrate this application to the sap portal.

Problem: The websites are linked with the command Response.Redirect() and also parameters will be passed , but this command is not supported from the portal runtime.net.

Has somebody an idea, how i can intagrate this application easy or another method for Response.Redirect()?

Thank you

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Thank you very much for all your answers!

But has somebody of you an exact example, how i can rewrite my sample code, that it works in SAP Portal.

Former Member
0 Kudos

Hi Guntram,

lets say you have two PortalComponents: FirstPortalComponent and SecondPortalComponent. Both are published in the portal and are placed inside two IViews (FirstPortalComponentIView, SecondPortalComponentIView). These two IViews are placed inside a Workset called OwnWorkset that is in turn placed inside a Role called OwnRole. This Role lies inside the folder OwnContent in the portal content.

When you want to have a button (NextButton) in your FirstPortalComponent that leads to your SecondPortalComponent place the following code into the ascx code page of the FirstPortalComponent (assuming you are using the prefix "com.test" for all your portal items):

<sap:Button ID="NextButton" runat="server" Text="Next" Width="80" BUTTONCLICK="EPCM.doNavigate('ROLES://portal_content/com.test.OwnContent/com.test.OwnRole/com.test.OwnWorkset/com.test.SecondPortalComponentIView')"></sap:Button>

If you want to pass some information to the SecondPortalComponent you have to use a session variable. Place this code into the Visual Basic code page of your FirstPortalComponent:

Protected Sub NextButton_Action(ByVal sender As System.Object, ByVal e As SAP.Web.UI.Controls.AbstractButton.ActionEventArgs) Handles NextButton.Action

Session.Add("Test", 88)

End Sub

You can read the session variable "Test" in the load method of your SecondPortalComponent (Session.Item("Test")).

Former Member
0 Kudos

Hi Guntram,

How are you doing ?

redirection in a ASP.NET Portal Application, is different to a ASP.NET web application / windows forms application.

Please refer to the architecture details

http://help.sap.com/saphelp_nw2004s/helpdata/en/38/feca41abbdc517e10000000a155106/frameset.htm

also read Ofer's paper on ASP.NET Vs SAP NetWeaver Controls

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cbbfeb90-0201-0010-3aab-9e9...

the idea is not to consume .NET classes and do what you usually do in the .NET way.

but more to be able to use SAP NetWeaver Classes and it's methodology with MS tools.

The similar concept is true of Visual J#, here the java language objects are not necessarily used, it is a java language syntax, which essentially uses .NET classes.

with respect,

amit

Former Member
0 Kudos

Hi!

Thank you for your answer!

Here is a sample of my code:

Session("wb_neu") = 1

If selection = 8 Then

Response.Redirect("Zeiteingabe.ascx?date=" + Me.textboxArray(0).Text)

Else

Response.Redirect("Zeiteingabe.ascx?date=" + Me.textboxArray(selection - 1).Text)

End If

Perhaps somebody has another ideas.

thanks

Former Member
0 Kudos

Hi Guntram,

How are you doing ?

The Client Side framework can be used for navigation in the EP, the .net pdk too )

for a .net portal component application you the usage of the client side framework is highly recommended

<script>

function onClick(where)

{

EPCM.doNavigate(where);

}

</script>

with respect,

amit

Client Side Events Tutorial:

https://www.sdn.sap.com/irj/go/km/docs/library/dotnet/pdk%20for%20.net/developer's%20Guide%20PDK%202.0%20for%20.NET/Tutorials/Client%20Side%20Events.htm

Navigation API :

EPCM.doNavigate(String target, [int mode, String winFeat, String winName, int history, String targetTitle, String context])

http://help.sap.com/saphelp_nw04/helpdata/en/26/71c74030308431e10000000a1550b0/frameset.htm

Link control events :

https://www.sdn.sap.com/irj/go/km/docs/library/dotnet/pdk%20for%20.net/developer's%20Guide%20PDK%202.0%20for%20.NET/Reference/SAP.Web.UI.Controls.Events.LinkEvents.html

Former Member
0 Kudos

Guntram, I don't suppose a little javascript would do the trick for you would it?

If so, try this:


<script language='javascript' type='text/javascript'>
  parent.targetframename.location.replace('yourPage.aspx?param1=something¶m2=something2');
</script>

Ray