Writing HTML code in C# -
मुझे क्या करना है;
के लिए (int i = 0; i & lt; thexfiles.Length; i ++) {tosend = tosend + "& lt; tr & gt; & lt; टीडी & gt;" + thexfiles [i] + "& lt; / td & gt; & lt; टीडी & gt; "+ thexdates [i] +" & lt; / टीडी & gt; & lt; / टीआर & gt; & lt; टीआर & gt; "; } Mail.Body = tosend; मैं सी # कोड में एक तालिका में डेटा सम्मिलित करना चाहता हूं (html का उपयोग करके?), इसलिए जब यह मेल किया जाता है तो यह साफ दिखता है।
आपको बस ऐसा करना होगा:
के लिए (int i = 0; i & lt; thexfiles.Length; i ++ ) {Tosend = tosend + "& lt; tr & gt; & lt; td & gt;" + thexfiles [i] + "& lt; / td & gt; & lt; टीडी & gt;" + thexdates [i] + "& lt; / td & gt; & lt; / tr & gt; "; } Tosend = "& lt; html & gt; & lt; तालिका & gt;" + Tosend + "& lt; / table & gt; & lt; / html & gt;"; Mail.IsBodyHtml = सच; Mail.Body = tosend; और यही है, मेल बॉडी HTML तालिका में दिखाया जाएगा।
Comments
Post a Comment