In Below code I'm sending every user grid data to him individually. If I have only one user record then email sending successfully. on the other hand If I have two users record then while sending 2nd user record
A page can have only one server-side Form tag. error occurs.
protected void mail_Click(object sender, EventArgs e)
{
HiddenField hdfUserId, hdfEmail, hdfUserId_Next;
int gridCounter = grdTask.Rows.Count;
for (int i = 0; i < gridCounter; i++)
{
hdfUserId = grdTask.Rows[i].FindControl("hdnUserId") as HiddenField;
hdfEmail = grdTask.Rows[i].FindControl("hdnEmail") as HiddenField;
//if not last row
if ((gridCounter - 1) > i)
{
hdfUserId_Next = grdTask.Rows[i + 1].FindControl("hdnUserId") as HiddenField;
if (!hdfUserId.Value.Equals(hdfUserId_Next.Value))
{
SentEmailToUser(hdfUserId.Value, hdfEmai ...
Go to the complete details ...