Results 1 to 6 of 6

Thread: QueryString parameter OnAfterLogin PEI

  1. #1
    Join Date
    Oct 2008
    Posts
    47

    QueryString parameter OnAfterLogin PEI

    Hi,

    I am a beginner in ALUI portal development and writing c# program in OnAfterLogin PEI to capture the querystring paramater from the URL. But I am not able to capture the querystring parameter from the URL. suppose This is the URL I am entering in the browser.

    http:techarena.in/portal/server?TokenID=j5S1Apz3

    This is the code I wrote in OnAfterLogin PEI.

    IXPRequest xpRequest = _appData.GetRequest();
    string redirectAfterLogin=xpRequest.GetRequestURL();
    pTokenID=xpRequest.GetParameterValue("TokenID");

    But the QueryString is always null. Please help me to figure it out.
    Thanks in advance.

  2. #2
    Join Date
    Oct 2008
    Posts
    11

    Re: QueryString parameter OnAfterLogin PEI.

    try doing something like this:

    _appData.GetRequest().GetParameterValue(TokenID)

    It may help you

  3. #3
    Join Date
    Oct 2008
    Posts
    47

    Re: QueryString parameter OnAfterLogin PEI.

    No it didn't work. although The above code work for a guest login. I can capture the Queystring for the GuestUser. But when we enter the user ID and Password in the login page, the querystring is always null on onAfterLogin.

  4. #4
    Join Date
    Oct 2008
    Posts
    11

    Re: QueryString parameter OnAfterLogin PEI.

    So this is a line directly from one of my pei's:
    _appData.GetParameterValue("curRef");

    Now that said, it is from a PEI that gets invoked by a guest user. I have never tried to grab a qs from a newly logged in user, but it should be the same. What i suggest is that you debug and step through your pei. You should take a look at the request object and the appdata object to see what is exactly in there. Perhaps the QS is getting stripped or something during aredirect.

  5. #5
    Join Date
    May 2008
    Posts
    115

    Re: QueryString parameter OnAfterLogin PEI.

    Try GetQueryString()

    gets all data after the /portal/server.pt

    It could be getting stripped, especially if as guest user you had to physically press the "login" button that redirected you to the login page.

    If not, it should still be there.

  6. #6
    Join Date
    Oct 2008
    Posts
    47

    Re: QueryString parameter OnAfterLogin PEI.

    Figured it out. The string redirectAfterLoginURL contails all the URL parameters, it is working if the url contains some community ID.

    IXPRequest xpRequest = _appData.GetRequest();
    string redirectAfterLoginURL = Request.GetParameterValue(ASConstants.REDIRECT_AFTER_LOGIN_INPUT);

    Thanks guys for your help.

Similar Threads

  1. JSF example url? Parameter Help!!
    By Gadin in forum Software Development
    Replies: 5
    Last Post: 21-09-2010, 10:05 PM
  2. How to enable ASP encrypt querystring with website page
    By Suzane in forum Software Development
    Replies: 3
    Last Post: 04-08-2009, 11:42 AM
  3. javascript add parameter to url
    By purvagarg in forum Software Development
    Replies: 3
    Last Post: 23-07-2009, 08:04 PM
  4. What is parameter tampering ?
    By Anathakrishnan in forum Technology & Internet
    Replies: 5
    Last Post: 21-04-2009, 09:25 AM
  5. Code for returning the QueryString
    By Samir_1 in forum Software Development
    Replies: 1
    Last Post: 14-01-2009, 12:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •