是否有可能在引用c# VB中调用文本框

本文关键字:调用 文本 VB 有可能 引用 是否 | 更新日期: 2023-09-27 17:51:12

我想使用c#制作一个电子邮件到SMS程序。在正文中,我想调用一个文本框,其中用户输入的值将被替换为一行。

下面是我的代码:
    public string FromAddress = "cmdsa.system@gmail.com";
    public string Password = "XXXXXXXXXX";
    public string To = "sms@isms.com.my";
    public string Subject = "isms";
    public string Body =
    "STARTISMS
    username:password:1
    6017xxxxxxx, <--  here is where i want to call a textbox where it will 
                      be replace with the value entered in the box at the
                      interface.
    testing 1234567890
    ENDISMS";
    public string Smtp = "smtp.gmail.com";
    public int Port = 587;
请告诉我做这件事的正确方法。包括如何在body部分内编写以下多个文本的正确方法
"STARTISMS
 username:password:1
 6017xxxxxxx, <--  here is where i want to call a textbox where it will be  
                   replace with the value entered in the box at the 
                   interface.
 testing 1234567890
 ENDISMS";

是否有可能在引用c# VB中调用文本框

不清楚!为什么要直接输入属性?如果它们总是静态的,对于制作body属性,你可以点击发送按钮制作它。

body = "S.T" + textBox1.Text;