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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:59:28+00:00 2026-05-28T13:59:28+00:00

I am implementing a standard payment system, which sends some information to 3rd part

  • 0

I am implementing a standard payment system, which sends some information to 3rd part form. I’ve a checkout object which stores all my shopping information: ID, products bought, price – you name it.

People are transfered to an ASPX page which has an implementation as seen below.

Currently I have the following problem:

The values send on the inputs which has the runat=”server” is 0. Therefore I get an error. However, in the OnPreInit event in the code behind, i set the values of amount, accepturl and orderid. I can see the hidden fields get the correct information when the page is loaded – but when the form is fired (which apparently happens before the OnPreInit event), it is still 0.

How do I solve this problem? Basically I need to use an HTML form which opens a popup window (which HAS to show on page load), where I have to set the hidden fields. Should be quite simple, but after I’ve used hours on this I would really appreciate some help.

Currently my implementation is like this:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BetalingMedKort.aspx.cs" Inherits="BetalingMedKort" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
        <script type="text/javascript" src="http://www.epay.dk/js/standardwindow.js"></script> 
    <title></title>
</head>


<body onload="open_ePay_window()">

    <form action="SomeUrl" runat="server" method="post" name="ePay" target="ePay_window" id="ePay">
<input type="hidden" name="merchantnumber" value="MyStaticMerchantNumber" /> 
<input type="hidden" name="language" value="1" /> 
<input type="hidden" name="currency" value="208" /> 
<input type="hidden" name="amount" id="amountField" runat="server" /> 
<input type="hidden" name="accepturl" id="acceptUrlField" runat="server" /> 
<input type="hidden" name="orderid" id="orderIdField" runat="server"  />
<input type="hidden" name="declineurl" value="SomeUrl" />

</form> 


    <div>
        If the ePay Payment Window does not open automatically please click on the button below to open it.
    <br /><br />
Notice! If you are using a pop-up blocker, you must hold down the CTRL key as you click the button.
<br /><br />
<input type="button" value="Open the ePay Payment Window" onClick="open_ePay_window()"> 
    </div>

</body>
</html>

Thanks so much…

  • 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-28T13:59:29+00:00Added an answer on May 28, 2026 at 1:59 pm

    Try setting the input values in the page’s Init or Load events. ViewState isn’t available during PreInit (though there may be some exceptions).

    If you absolutely have to perform your logic during PreInit then this page may have a workaround for you.

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

Sidebar

Related Questions

Is there any standard way of implementing some sort of a write-through buffer for
I'm currently working on implementing the Distributed Annotation System-standard for our project openSNP.org, however,
I'm implementing a standard as an object oriented library in Java. Standard includes many
Is there any microformat/standard for implementing search form on the site? (access keys, naming
Is there a standard when it comes to implementing keyboard shortcuts / accelerator keys
Does anyone know of any best practices or 'standard' techniques for implementing authentication between
When implementing a needle search of a haystack in an object-oriented way, you essentially
Im implementing ITU standard based loudness measurement program and as it states i should
Implementing Document-View pattern I faced the problem: standard generic collections and dictionaries ( List<T>
How would compilers implementing the freestanding portion of each different standard below have 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.