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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:07:09+00:00 2026-05-26T02:07:09+00:00

I am trying to integrate with a payment gateway. They require a set of

  • 0

I am trying to integrate with a payment gateway. They require a set of hidden input boxes to be posted to their gateway like:

<input id="orderref" name="orderref" type="hidden" runat="server"/>

I have added runat=”server” so I can dynamically populate the boxes with values.

However, of course at runtime the input box name gets changed to:

<input name="ctl00$ContentPlaceHolder1$orderref" type="hidden" id="ContentPlaceHolder1_orderref" value="9" />

I’m in a catch 22. If I remove runat=”server” all is fine with regards to the name, but I then can’t populate the input box with values! Is there a means to force the name of the field to stay the same?

  • 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-26T02:07:09+00:00Added an answer on May 26, 2026 at 2:07 am

    Depending on what .NET version you are using the control over this differs: basically, pre-.NET4 you can only alter the container prefix by implementing your own, but from .NET4 you can omit the container prefixes using ClientIDMode.

    Alternatively, you may expose methods, say, on your page or master page and then call them using inline-scripting (<%=MyMethodReturningValue() %>) which is evaluated at the time of render.

    EDIT:

    To elaborate a little on my second suggestion, you can define a method in your pages code-behind that can be executed in an inline manner by use of embedded code blocks; the referenced link gives simple examples of this, but the methods needn’t be in <script> blocks of the page itself (as I previously touched on) so that you can keep your logic separated, such as:

    Define a method in your page’s code-behind:

    public string RenderMessage()
    {
        return "This need not be a hard-coded string!";
    }
    

    Write out your input element, omitting the runat attribute, and adding the embedded code block in place of where the value would be (think of this as a place holder); this code block is going to call the specified method on pre-render, and essentially be replaced by the returning value:

    <input id="orderref" name="orderref" type="hidden" value='<%=RenderMessage() %>'/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to integrate a payment gateway to my ecommerce website. Should I
I am trying to integrate payment gateway in my android app. Purpose of app
I'm trying to integrate Clickbank as a payment platform for a client, and basically
I am trying to integrate a PayPal Website Payments Standard > Cart Upload payment
I am trying to integrate a calendar plugin like google calendar with custom database
Im trying to create a payment system that integrates with eWay .. They have
i am trying to integrate a transaction form that uses a set amount. for
I'm trying to integrate JQM with Facebook Like and Twitter Tweet on my second
I'm trying to integrate a like button in my iPhone application. Beyond the other
While trying to integrate Yahoo Media Player into my own website, I want 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.