Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
0
Reply
How to Array using table column value passing array
Nirmal KumarC
Sep 10 2014 10:23 AM
533
Reply
Table Design:
Template table:
Tempid
TemplteName
TempMessage
TempActive
1 Fees Dear * your * amount * is pending A
categories Table:
id
ValueId
Categories
1 1 $Studentid$
2 2 $StudentName$
3 3 $CrsDate$
4 4 $PendingAmount$
5 5 $Text$
category Get table
id
Template_ID
SNo
ValueId
1 1 1 2
2 1 2 3
3 1 3 4
This three table joinig i will get temp id wise result this:
Categories
:
$StudentName$
$CrsDate$
$PendingAmount$
how to assign this data passed:
string message = TxtMsg.Text;
string[] replacements = { $StudentName$, $CrsDate$,$PendingAmount$ };
MatchCollection mc = Regex.Matches(message, @"\*");
int limit = Math.Min(mc.Count, replacements.Length) - 1;
for (int i = limit; i >= 0; i--)
{
message = message.Remove(mc[i].Index, 1).Insert(mc[i].Index, replacements[i]);
}
TxtMsg.Text = message.ToString();
I want This result :
Dear
John
your
25000
is started pending amount
Thank You
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
C# Code For Execute Stored Procedure
Asp.net deploy