Note that there are some explanatory texts on larger screens.

plurals
  1. POInput string was not in a correct format in replace mehod
    primarykey
    data
    text
    <p>I want to edit a text and there is some dynamic fields in it, so i used replace method to have these fields in special place in context. my problem is when i want to replace these fields in context it gave me an error: Input string was not in a correct format. the error happen in the EmailBody. and the content of Body variable is this:</p> <pre><code>FROM: {JournalAbbreviation} &amp;lt; {JournalAbbreviation}@test.com&amp;gt;&lt;br /&gt; SUBJECT: Review Submitted Successfully for {JournalAbbreviation}&lt;br /&gt; BODY:&lt;br /&gt; Manuscript ID:&amp;nbsp; {ManuscriptID}&lt;br /&gt; Title: {Title}&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; Dear {Prefix} {Firstname} {Middlename} {Lastname},&lt;br /&gt; &lt;br /&gt; Thank you for your review for {JournalAbbreviation}. We appreciate your time and feedback and hope to collaborate with you again in the near future.&lt;br /&gt; &lt;br /&gt; Kind regards,&lt;br /&gt; {FirstnameSender}, PhD&lt;br /&gt; Associate Editor&lt;br /&gt; {JournalFullName}&lt;br /&gt; http://{JournalAbbreviation}.test.com&lt;br /&gt; &lt;br /&gt; </code></pre> <p>This code has been saved as string in database and Body variable fill with these code.</p> <pre><code> Body = Body.Replace("{Prefix}", "{0}"); Body = Body.Replace("{Firstname}", "{1}"); Body = Body.Replace("{Middlename}", "{2}"); Body = Body.Replace("{Lastname}", "{3}"); Body = Body.Replace("{ManuscriptID}", "{4}"); Body = Body.Replace("{Title}", "{5}"); Body = Body.Replace("{JournalAbbreviation}", "{6}"); Body = Body.Replace("{FullJournalName}", "{7}"); Body = Body.Replace("{PrefixSender}", "{8}"); Body = Body.Replace("{FirstnameSender}", "{9}"); Body = Body.Replace("{MiddlenameSender}", "{10}"); Body = Body.Replace("{LastnameSender}", "{11}"); string **EmailBody** = String.Format(Body, Prefix, Firstname, Middlename, Lastname, ManuscriptID, Title, JournalAbbreviation, FullJournalName, PrefixSender, FirstnameSender, MiddlenameSender, LastnameSender); </code></pre> <p>The print out is:</p> <p>FROM: IEEE &lt; IEEE@test.com> SUBJECT: Review Submitted for IEEE</p> <p>Manuscript ID: 102-IEEE-2013 Title: Text mining using biclustering method International Electrical Engineering </p> <p>Dr John Smith,</p> <p>A review has been submitted for the above-mentioned manuscript. </p> <p>Kind regards, International Electrical Engineering <a href="http://IEEE.test.com" rel="nofollow">http://IEEE.test.com</a></p> <p>Can any body help me to find the the problem? Thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload