Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6610227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:48:48+00:00 2026-05-25T19:48:48+00:00

I am trying to implement Single Sign On allowing the users to sign on

  • 0

I am trying to implement Single Sign On allowing the users to sign on to multiple vendors. Each vendor has token that need to be send as a form post. I am posting this token as HTTPRequest and getting the Response back like in the code below

private static string PostDataToServerAndGetResponse()
{
Uri uri = new Uri("http://www.amazon.com/exec/obidos/search-handle-form/102-5194535-6807312");
string data = "field-keywords=ASP.NET 2.0";
        if (uri.Scheme == Uri.UriSchemeHttp)
        {

            HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri);
            request.Method = WebRequestMethods.Http.Post;
            request.ContentLength = data.Length;
            request.ContentType = "application/x-www-form-urlencoded";
            StreamWriter writer = new StreamWriter(request.GetRequestStream());
            writer.Write(data);
            writer.Close();
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            StreamReader reader = new StreamReader(response.GetResponseStream());
            string tmp = reader.ReadToEnd();
            response.Close();
            //return response.ResponseUri.AbsoluteUri;
            return tmp;

        }

        return null;
}

The returned value – tmp is a HTML string which I want to display into an Iframe. I can do this by adding a Literal control in the iframe and setting the text property to the value returned by the above function

<iframe  id="myIFrame" runat="server"  height="700" width="950"  frameborder="0" />
    <asp:Literal ID="litFrame" runat="server" Mode="PassThrough" />

 </iframe>

 litFrame.Text = SAML.PostDataToServerAndGetResponse();

The above code dispaly the page fine, but when i click on any of the links it opens a new page.
There is no apparent framebusting java script, because if I set the ‘src’ attribute of the iframe to response.ResponseUri.AbsoluteUri, all the clicks and page refreshes stay in the frame.

What I want to achieve

Display the Result of the post into Iframe and all the user to perform any clicks.
Condition: Clicks in the frame should refresh the frame and not jump out to a new page.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:48:49+00:00Added an answer on May 25, 2026 at 7:48 pm

    Iframes do not work they way you think. The content inside an <iframe> tag is meant to be shown only if the tag is not supported by the browser, not as default content of the iframe. I’m surprised you see any of your literal’s content at all on the page — is there actually an <iframe> output in your html source, or did ASP.NET get ‘smart’ and output something different?

    Really, your options are:

    • Set the url of the iframe to a page/handler/etc that will generate the content you want inside the iframe (ie, THAT page calls your PostDataToServerAndGetResponse method)
    • Use javascript to write the content into the iframe
    • You could set the target of a <form> to the iframe, and post the data to it

    I’d say option 1 would be the easiest/cleanest.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement an application that coordinates multiple users who are scheduling exclusive
I'm trying to implement thinking-sphinx across multiple 'sites' hosted under a single rails application.
I'm trying to implement a simple horizontal navigation menu that just shows a single
I'm trying to implement single sign-on using facebook in my ruby sinatra app. So
I am using PHP5 and CodeIgniter and I am trying to implement a single-sign
I'm trying to implement a single-sign-on link from application written in JAVA, to another
I'm trying to implement an interface that requires a single property, but I don't
I'm trying to implement SSO (Single Sign On) but I can't get the correct
Here's the scenario: Trying to implement a single sign on intranet system, but there
I'm trying to implement single sign-on for a web portal. I've written some code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.