|
MbRequest Reference
Docs:
Certificate
Crypt
XML
Mail
MHT
S/MIME
Zip
SSL
RTC
Charset
CkStringArray
CkData
ChilkatCSP
Help
for Creating Objects in ASP
The MbRequest
ActiveX component allows you to access HTML multibyte form data
without causing unwanted or implicit (and misinterpreted) conversion
to Unicode such as that which occurs when using the standard Request.Form
method. This is particularly useful when an HTML form submits
multibyte character data in a character encoding such as utf-8,
shift-JIS, iso-2022-jp, euc-kr, big5, gb2312, etc.
Here
is an example of how an ASP script might process multibyte form
data using this component:
<HTML> <HEAD>
<TITLE>Process Multibyte Form Data</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</HEAD>
<BODY>
<%
' The Request data is utf-8, so use Chilkat's MbRequest object to access the
' Form data. Calling BinaryRead causes the Form data to be loaded into the
' MbRequest object.
set mbRequest = Server.CreateObject("ChilkatUtil.MbRequest")
mbRequest.BinaryRead
' You can loop over all the form parameters like this
numParams = mbRequest.GetNumParams()
for i = 0 to numParams-1
' Get the parameter name as a String
paramName = mbRequest.GetNameByIndex(i)
' Get the parameter data as a Variant (byte array)
paramData = mbRequest.GetValueByIndex(i)
' Do something with the data.
next
' You can also access the parameter data by name
paramData = mbRequest.GetValue("parameter_name")
' You can also access the entire Request data as a Variant (byte array)
' or as a quoted-printable String
qpString = mbRequest.GetDataQP()
requestData = mbRequest.GetData()
%>
</BODY>
</HTML>
|
Methods
- BinaryRead()
- Must
be called first to read the Request data into the MbRequest
object.
- GetData()
As Variant
- Returns
the entire Request data as a Variant (byte array)
- GetDataQP()
As String
- Returns
the entire Request data as a quoted-printable String
- GetNameByIndex(index
As Long) As String
- Returns
the Nth parameter name. Indexing begins at 0.
- GetNumParams()
As Long
- Returns
the number of Request parameters.
- GetValue(paramName
As String) As Variant
- Returns
a Request parameter's value.
- GetValueByIndex(index
As Long) As Variant
- Returns
a Request parameter's value.
-
-
-
-
-
-
-
-
-
|
Privacy
Statement. Copyright 2000-2012 Chilkat
Software, Inc. All rights reserved.
(Regarding the usage of the Android logo) Portions of this page are reproduced from work created and shared by Google
and used according to terms described in the Creative Commons
3.0 Attribution License.
Send feedback to support@chilkatsoft.com
Software components and libraries for Linux, MAC OS X, IOS (IPhone), Android™, QNX, Solaris, HP-UX, RHEL/CentOS Microsoft Windows 7, Vista, XP, 2000, 2003 Server, 2008 Server, and Windows 95/98/NT4.
|
|