Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 394
  • Last Modified:

how to change the culture on the aspx page

hello experts
i am trying to post data to the payment gateway to process the order however having issues with customers who has different regional settings set sending incorrect decimal in the amount field

i have a function which invokes the call to the external website and just before going to the third party site for the payment i want to change the culture to "UK"

please can someone advise how to set the culture here?


Private Function SendToEPDQ(ByVal OrderID As Integer, ByVal Total As Decimal) As Boolean
            Culture = "en-UK"    ' i am getting error if i do this here 
            'The Following Creates the WebClient Object
            Dim web As New System.Net.WebClient()
            'The Header Content Type is then set
            web.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
            'PostData is then declared as data type Byte and populated with the post data
                 'The Web object is then used to upload the postdata to the Encryption URL and the response is stored in the Response variable
              'The response from the post is the converted from Type Byte to String and stored in the session variable
            Dim TextResponse As String = (System.Text.Encoding.ASCII.GetString(Response))
            Session("Response") = TextResponse
        Catch ex As Exception
          test.eMail.SendErrorEmail("Error retrieving information from ePDQ (CheckOutDetails - SendToePDQ)", ex.ToString)
            Return False
        End Try
        Return True
    End Function

Open in new window

2 Solutions
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-UK");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-UK");
newbie27Author Commented:

apparently its en-GB

Thread.CurrentThread.CurrentCulture = new CultureInfo("en-GB");

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now