Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











PROPERTY:  Session.CodePage

The CodePage property specifies which server codepage to use when displaying dynamic Active Server Pages. A codepage is a character set used for symbol mapping. The default value of the CodePage varies by location and language. If you specify a new CodePage property, it will exist only for the duration of the session.

Code:
 
<% @CodePage = 437
//Save orginal codepage information
Session("CodePage") = Session.CodePage
 
//ID is the CodePage ID from form and
//text is the text entered in the Form
ID = Request.Form("ID")
text = Request.Form("ToTranslate")
 
//Look up text in specified language. The function FindTranslation
//does the work of finding the translation.
Session.CodePage = ID
translation = FindTranslation(text, ID)
 
//Change CodePage in order to write in English then change
//it again to write in specified language
 
If translation <> "" Then
   Session.CodePage = Session("CodePage")
   Response.Write "The translation of " & text & " is "
   Session.CodePage = ID
   Response.Write translation
End If
%>
 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information