WebClientProtocol.RequestEncoding プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > WebClientProtocol.RequestEncoding プロパティの意味・解説 

WebClientProtocol.RequestEncoding プロパティ

クライアントXML Web サービス要求するときに使用される Encoding

名前空間: System.Web.Services.Protocols
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

Dim instance As WebClientProtocol
Dim value As Encoding

value = instance.RequestEncoding

instance.RequestEncoding = value
public Encoding RequestEncoding { get; set;
 }
/** @property */
public Encoding get_RequestEncoding ()

/** @property */
public void set_RequestEncoding (Encoding value)
public function get RequestEncoding
 () : Encoding

public function set RequestEncoding
 (value : Encoding)

プロパティ
クライアントによる要求使用する文字エンコーディング既定値null 参照 (Visual Basic では Nothing) で、基になるトランスポートプロトコル既定エンコーディング使用されます。

解説解説
使用例使用例

XML Web サービス (Math) を呼び出す ASP.NET Web フォームの例を次に示します。この Web フォームでは、EnterBtn_Click 関数の中で、RequestEncoding を UTF-8明示的に設定します

<html>
    <script language="VB" runat="server">
        Sub EnterBtn_Click(Src As Object,
 E As EventArgs)
            Dim math As New
 MyMath.Math()
            
            ' Set the Content Type to UTF-8.
            math.RequestEncoding = System.Text.Encoding.UTF8
            
            Dim iTotal As Integer
 = math.Add(Convert.ToInt32(Num1.Text), Convert.ToInt32(Num2.Text))
            Total.Text = "Total: " & iTotal.ToString()
        End Sub
 
    </script>
 
    <body>
       <form action="MathClient.aspx" runat=server>
           
          Enter the two numbers you want to add and
 then press the Total button.
          <p>
          Number 1: <asp:textbox id="Num1" runat=server/>
  +
          Number 2: <asp:textbox id="Num2" runat=server/>
 =
          <asp:button text="Total" Onclick="EnterBtn_Click"
 runat=server/>
          <p>
          <asp:label id="Total"  runat=server/>
          
       </form>
    </body>
 </html>
   
<html>
    <script language="C#" runat="server">
       void EnterBtn_Click(Object Src, EventArgs E) 
          {
             MyMath.Math math = new MyMath.Math();
 
             // Set the Content Type to UTF-8.
             math.RequestEncoding = System.Text.Encoding.UTF8;
            
            int total = math.Add(Convert.ToInt32(Num1.Text), Convert.ToInt32(Num2.Text));
            Total.Text = "Total: " + total.ToString();
         }
 
    </script>
 
    <body>
       <form action="MathClient.aspx" runat=server>
           
          Enter the two numbers you want to add and then press the Total button.
          <p>
          Number 1: <asp:textbox id="Num1" runat=server/>  +
          Number 2: <asp:textbox id="Num2" runat=server/> =
          <asp:button text="Total" Onclick="EnterBtn_Click"
 runat=server/>
          <p>
          <asp:label id="Total"  runat=server/>
          
       </form>
    </body>
 </html>
   
<html>
    <script language="JSCRIPT" runat="server">
        function EnterBtn_Click(src : Object, e : EventArgs){
            var math : MyMath.Math = new MyMath.Math()
            
            // Set the Content Type to UTF-8.
            math.RequestEncoding = System.Text.Encoding.UTF8
            
            var iTotal : int = math.Add(Convert.ToInt32(Num1.Text),
 Convert.ToInt32(Num2.Text))
            Total.Text = "Total: " + iTotal.ToString()
        }
 
    </script>
 
    <body>
       <form action="MathClient.aspx" runat=server>
           
          Enter the two numbers you want to add and then press the Total button.
          <p>
          Number 1: <asp:textbox id="Num1" runat=server/>  +
          Number 2: <asp:textbox id="Num2" runat=server/> =
          <asp:button text="Total" Onclick="EnterBtn_Click"
 runat=server/>
          <p>
          <asp:label id="Total"  runat=server/>
          
       </form>
    </body>
 </html>
   
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WebClientProtocol クラス
WebClientProtocol メンバ
System.Web.Services.Protocols 名前空間
Encoding
ContentType
WebRequest


このページでは「.NET Framework クラス ライブラリ リファレンス」からWebClientProtocol.RequestEncoding プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からWebClientProtocol.RequestEncoding プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からWebClientProtocol.RequestEncoding プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

WebClientProtocol.RequestEncoding プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



WebClientProtocol.RequestEncoding プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS