replace texbox values inside an html template

前端 未结 2 1473
北恋
北恋 2021-01-29 12:42

i have some textboxes.. when \'preview\' button is clicked it goes to another page which contains an html template.. i need to replace the textbox entered values inside the temp

2条回答
  •  日久生厌
    2021-01-29 13:02

    public partial class EmployeePortal_CommunicationPreview : System.Web.UI.Page
    {
    
        protected void Page_Load(object sender, EventArgs e)
        {
    
    
            System.IO.FileStream fs = new FileStream("~/Auto-Emails/Internalcommunication.htm", FileMode.Open);
    
            StreamReader fr = new StreamReader(fs);
            string data = fr.ReadToEnd();
            string from  = data.Replace(" [mg-from]", txtfrom.text);
    
        }
    }
    

    here the txtfrom.text belongs to the first page... i need to pass the txtfrom of the first page to the second page replacing [mg-from]... how will i do ??

提交回复
热议问题