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 278533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T01:15:14+00:00 2026-05-12T01:15:14+00:00

I have a facebook game application that is released at facebook platform at the

  • 0

I have a facebook game application that is released at facebook platform at the following link :
FaceBookGameApplication

and i am using iframe and the problem now that after answering the question in the game i reload the page from javascript code :

window.location.href = sURL;

and on posting back i am updatting 2 divs of the score and hits with new values by getting the value exists and incrementing it with one according to user answer as the game is some questions and user answers them :

Hits = int.Parse(HitsNo.InnerText) + 1;
HitsNo.InnerText = Hits.ToString();

or :

Hits = int.Parse(HitsNo.InnerHTML) + 1;
HitsNo.InnerHTML = Hits.ToString();

and in the first time of reloading the values are changed and after that on each time of the reload the values don’t change and the 2 divs don’t take the new values that i set to them. The 2 divs runat server and i am using C# under .Net 2008 so what cause the two divs not changing thier innerText or innerHTML with new valuies io set from codebehind?

thanks in advance

  • 1 1 Answer
  • 2 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-12T01:15:15+00:00Added an answer on May 12, 2026 at 1:15 am

    If I’m following correctly, you’re using HTML divs to display the score. Then from code-behind, you’re retrieving the HTML from those divs to access the most recent score value.

    The problem then is that the DIVs are not part of the http post. Therefore each time your code-behind runs it is using the original value, adding one to it, and then displaying the new value. The next time the postback occurs, again it uses the original value, adds one, and displays.

    Instead, use a hidden input element to store the score, as that will be part of the http post each round trip.

    For example:

    <input type="hidden" id="HitsNo" value="1" runat="server" />
    

    Then you can access that hidden value in your code-behind.

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

Sidebar

Related Questions

I have a game application released at the Facebook platform. I need to set
I have a facebook application that is published at facebook platform and i used
I have an application in facebook platform (a trial application) and i am using
In my Facebook Canvas application i have the following problem: The Facebook application is
I previously have an FBML application in Facebook and now change to an IFrame
I am writing a Facebook application that is a simple board game which I
I have developed a simple interactive Flash game, but now it appears that sometimes
I have a Facebook application that has a user profile tab. The specs of
I have a Facebook desktop application and am using the Graph API . I
I have a multiplayer game for the facebook platform and I would like to

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.